I've installed Apache 2.0.64 (latest release for windows) and Tomcat 7.0.32.
All incoming HTTP requests should be forwarded to Tomcat. But I don't manage having it working , nothing is forwarded to Tomcat :-(
# Define 1 real worker named ajp13
# Set properties for worker named ajp13 to use ajp13 protocol,
# and run on port 8009
Incidentally, mod_jk and mod_proxy are 2 different ways of connecting Apache and Tomcat, so you don't need both of them. Officially, mod_proxy is the 'preferred' way, and it's definitely less work to configure. Although the extra options that mod_jk requires may be an indication that it is more tunable. I haven't used mod_jk in so many years that I don't remember its virtues. Which back then were clouded by the mod_jk2/mod_jk3 debacle. Which, thankfully, has been resolved.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.
posted 7 years ago
I've added JkMount /* ajp13 at the end if the file mod_jk.conf.
Now, when entering www.stock-domain.com, I see the Tomcat welcome page.
Any suggestion how to forward to "http://www.stock-domain.com/stockdomain/financeMainLayout.htm".
good, now all requests to your domain are passed from Apache to Tomcat.
When I'm trying
it redirects me to:
and that means that document "financeMainLayout.htm" is set as welcome page for your application already.
So to make your app available at top domain as a default app, you can simply remove webapps/ROOT and rename your app from "stockdomain" to "ROOT", and restart tomcat. If you have stockdomain.war
then stop tomcat, remove webapps/ROOT, remove webapps/stockdomain directory, rename stockdomain.war to ROOT.war and start tomcat. Some may say it's not the best way, but it's the easiest and quickest way to make it happen.
Otherwise, the file $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml must be created by you by hand with correct docBase to your webapps/stockdomain, or you can add your Context inside conf/server.xml with path="" and docBase pointed to your application dir.
It's up to you what solution you will choose.
posted 7 years ago
Thanks a lot for information.
Renaming stockdomain to ROOT seems an overkill. www.stock-domain.com:8080 can be "exposed" to the world. Tomcat may handle all requests directly.
I only need one redirect : from www.stock-domain.com to http://127.0.0.1:8080/stockdomain/financeMainLayout.htm. Can this be specified somehow in apache config ?
Don't play dumb with me! But you can try this tiny ad: