Portal Home > Knowledgebase > Articles Database > tomcat 6 / apache 2 question


tomcat 6 / apache 2 question




Posted by madpato, 05-24-2010, 11:48 AM
Hello I have a tomcat 6 coexisting with apache 2 using mod_jk, thing is that i have a domain with its document root in /home/domain/htdocs, and i've uploaded a war file via tomcat manager which is in /opt/tomcat/webapps/domain the app shows fine under http://localhost:8080/domain, after that i've created a htaccess in the document root of my domain to redirect it to this url, so far thats fine. But what i need is when i type domain.com it redirects me to the app but i dont want to have that long url and just have domain.com Is that possible? ive read that mod_rewrite can do that. Can you help me please. Thanks in advance.

Posted by YUPAPA, 05-24-2010, 12:05 PM
You don't need mod_rewrite / .htaccess or anything. mod_jk can do all these. Please look at the jkmount directive and workers and possibly the jvmRoute in tomcat. Or use iptables to redirect the port 80 traffic to port 8080 if it is just one domain. Then you don't have to use apache at all.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Home Web server (Views: 497)