I have Apache 2.2 and Tomcat6.
I have a URL: I have a working Struts application at (It is a struts action that is called from index.jsp)
I need to point the domain name, to the application running on Tomcat 6 as in when someone types in I want him to
see the starting page of the app at P.S I have already tried all the forum posts and google to no effect.
Here is my configuration.
I have LoadModule mod_proxy and mod_proxy_ajp in httpd file.
Here is my virtual host declaration in httpd-vhosts file. I have rewritten it to the original problem hence no references to ajp.
<VirtualHost *:80>
<Directory "C:/vhosts/domain1">
Order deny,allow
Allow from all
</Directory>
DocumentRoot "C:/vhosts/domain1"
ServerName DirectoryIndex index.jsp
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPreserveHost Off
ProxyPass / ProxyPassReverse / </VirtualHost>
It works when I type in and gives me the index page of myApp. However, it switches the name to on all subsequent links starting from the index page. To prevent that, I turn ProxyPreserveHost On which breaks it completely.
Could someone show me EXACTLY how to fix my virtual host declaration AND ANYTHING ELSE to make this thing work with mod_proxy_ajp? Do I need to make any changes on Tomcat side in server.xml? If so, could someone please tell me exactly what to do to get this working. I have already tried google and forum posts but can't make this work. It's been a week already. Thanks in advance.
I have a URL: I have a working Struts application at (It is a struts action that is called from index.jsp)
I need to point the domain name, to the application running on Tomcat 6 as in when someone types in I want him to
see the starting page of the app at P.S I have already tried all the forum posts and google to no effect.
Here is my configuration.
I have LoadModule mod_proxy and mod_proxy_ajp in httpd file.
Here is my virtual host declaration in httpd-vhosts file. I have rewritten it to the original problem hence no references to ajp.
<VirtualHost *:80>
<Directory "C:/vhosts/domain1">
Order deny,allow
Allow from all
</Directory>
DocumentRoot "C:/vhosts/domain1"
ServerName DirectoryIndex index.jsp
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPreserveHost Off
ProxyPass / ProxyPassReverse / </VirtualHost>
It works when I type in and gives me the index page of myApp. However, it switches the name to on all subsequent links starting from the index page. To prevent that, I turn ProxyPreserveHost On which breaks it completely.
Could someone show me EXACTLY how to fix my virtual host declaration AND ANYTHING ELSE to make this thing work with mod_proxy_ajp? Do I need to make any changes on Tomcat side in server.xml? If so, could someone please tell me exactly what to do to get this working. I have already tried google and forum posts but can't make this work. It's been a week already. Thanks in advance.