Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to use my Tomcat application (deployed at ROOT) to be viewed from Apache port 80. To do this, I used mod_proxy, since mod_jk made me try harder.

I used sth like this in httpd.conf:

<location http://www.example.com>
   Order deny,allow
   Allow from all
   PassProxy http://localhost:8080/
   PassProxyReverse http://localhost:8080/ 
</location>
<Proxy *>
   Order deny,allow
   Allow from all
</Proxy>

And now I can not retrieve my previous sites on Apache, which was running prior to my configuration.

How can I have both running?

share|improve this question

1 Answer 1

Firstly, your proxypass syntax is wrong, I don't know how did this work at all. It should be

ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/

You have to have a separate Location section for every url you don't want to proxy to tomcat in front of the last proxying location, i.e.

<location /somedirectory>
   Order deny,allow
   Allow from all
   Options somethingorother
</location>

<location /some.html>
   ....
</location>

<location http://www.example.com>

....
</location>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.