The apache can connect to tomcat. When I run http://localhost/examples/servlet/MyHelloWorld, it works now. I did not setup Virtualhost. However, I have many users like localhost/~userA. I tried to add JkMount /*.jsp ajp13, JkMount /servlet/* ajp13 to httpd.conf in-between <Directory /home/*/html> </Directory>. However, the apache cannot be started because they cannot be added in-between <Directory>. I also tried to add <Host name="localhost/~userA"> <Context path="" docBase"/home/userA/html" /></Host> to server.xml. But, it still did not work. So, how should I configure httpd.conf, worker.properties and server.xml or other files in order to make it work? And advice?
You probably would have gotten more responses if you'd asked this in the Apache/Tomcat Forum. Ypu might be able to convert the URLs from the "~" shorthand to explicit paths using mod_rewrite, but I don't guarantee it, since mod_webapp has been known to be greedy and grab stuff before other Apache modules can see it. Maybe Apache 2.0 is better equipped to handle that. Mod_webapp was supposed to get friendlier in that regard, but if it has, it's been within the last 6 months, since that's when I last researched it.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
This tiny ad will self destruct in five seconds.
SKIP - a book about connecting industrious people with elderly land owners