Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_proxy_ajp problems with tomcat6 and apache 2.2

Status
Not open for further replies.

awebpro

Programmer
Sep 7, 2007
1
US
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.
 
Try this
Code:
<IfModule mod_proxy.c>
  ProxyRequests On
  ProxyPass /* [URL unfurl="true"]http://<server.name>:8080/myApp[/URL]
</IfModule>

Have Fun!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top