Can't get Tomcat proxyPath to work

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can't get Tomcat proxyPath to work

Postby shsavage » 25. March 2009 21:39

I'm running XAMPP win32 1.6.5 with the Tomcat 5.5.7 addin. I have an application that runs through Tomcat, which has to be accessed as http://ari.asu.edu:8080/VQI2. I'd like to access it through http://ari.asu.edu/vqi. I set up a redirect, which works, but I prefer setting up a proxy pass. However, when I follow the instructions from the Apache Software Group to set it up, i get an "Access Forbidden" screen when I try to open it. The relevant lines from http.conf are:

LoadModule proxy_module modules/mod_proxy.so

#
# Proxy paths for PotVQI program running on Tomcat
#
ProxyPass /vqi http://localhost:8080/VQI2/
ProxyPassReverse /vqi http://localhost:8080/VQI2/

and from Tomcat server.xml:

<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" proxyPort="80" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />

This isn't working. Any help would be appreciated.

Thanks,

-Steve
Stephen H. Savage
GAIA Lab
School of Human Evolution and Social Change
Box 872402
Arizona State University
Tempe, AZ 85287-2402
shsavage
 
Posts: 4
Joined: 18. October 2005 21:16
Location: Tepme, Arizona

Re: Can't get Tomcat proxyPath to work

Postby Izzy » 26. March 2009 05:24

For the Access 403 error check the xampp\apache\logs\error.log file.

Some observances that may help:
LoadModule proxy_module modules/mod_proxy.so

#
# Proxy paths for PotVQI program running on Tomcat
#
ProxyPass /vqi http://localhost:8080/VQI2/
ProxyPassReverse /vqi http://localhost:8080/VQI2/
Is this proxy_module uncommented in the main list of LoadModules in the httpd.conf file?

If not then remove the comment hash # from in front, then there is no need to include the line
LoadModule proxy_module modules/mod_proxy.so

This is the list of proxy related modules in the httpd.conf file I refer to:
#LoadModule proxy_module modules/mod_proxy.so <--uncomment this line
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so <-- uncomment this, see below
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so

Wrap your proxy in an IfModule directive and see if it helps.
Code: Select all
<IfModule proxy_module>
#
# Proxy paths for PotVQI program running on Tomcat
#
ProxyPass /vqi http://localhost:8080/VQI2/
ProxyPassReverse /vqi http://localhost:8080/VQI2/
</IfModule>
But see below and include this in the mod_jk.conf file not in the httpd.conf file.

Always remember to save any conf or ini files after editing and then restart the Apache server.


Here is a link or two to check out proxy_ajp_module and has some interesting reading.
http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html
http://wiki.apache.org/tomcat/FAQ/Connectors
http://stackoverflow.com/questions/7038 ... or-windows

Here some Apache docs links for mod_proxy:
http://httpd.apache.org/docs/2.2/mod/mo ... #proxypass
http://httpd.apache.org/docs/2.2/mod/mo ... assreverse
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Please heed the warning:
Warning

Do not enable proxying until you have secured your server. Open proxy servers are dangerous both to your network and to the Internet at large




Sorry I can't help you much with what you are trying to achieve but personally I would revert my httpd.conf file to the state is was in before you added any Tomcat entries.

Then I would use the Tomcat config. file mod_jk.conf file found in the xampp\apache\conf\extra folder - it also has a vhost example section that you may wish to experiment with and also this file would be the place to add your proxy or alias directives in.

You may also want to experiment with a JkMount entry.

Also you may wish to check out the Tomcat log files for any clues as to it's non acceptance of your config. changes etc. - xampp\tomcat\logs\

BTW, at present, if I go to http://ari.asu.edu:8080/VQI2 I get the Visual Query Interface.
If I go to http://ari.asu.edu/vqi it redirects the browser to http://ari.asu.edu:8080/VQI2 and the Visual Query Interface - so yes, your redirect works and when trying to change this redirect behavior to an alias, proxy or vhost, you first may have to comment out the redirect as this may always take precedence or otherwise interfere with your intentions if the redirect is contained in a .htaccess file - usually the .htaccess file will override your server conf files.

Please post back if any of this helps clear the fog patch. :)
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 77 guests