1

I'm trying to figure out what is wrong with this configuration of mod_proxy (I should say that I'm not familiar with apache). This is the content of my httpd.conf:

LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

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

<Location / >
    Order allow,deny
    Allow from all
</Location>

What I need is to show the tomcat's examples application when the main apache page is accessed. That is, run the examples application when I access http://[server ip].

I thought the previous configuration was sufficient for that, but when I try to access the main page of apache, I get the following error on browser:

HTTP Status 404 - /examplesexamples/

type Status report

message /examplesexamples/

description The requested resource (/examplesexamples/) is not available.
Apache Tomcat/6.0.29

In the browser URL bar, I can see that there was made a redirect to http://[server ip]/examples.

Any idea on that?

1
  • Have your tried adding a slash after examples/ in the lines with ProxyPass and ProxyPassReverse? Commented Aug 8, 2011 at 15:08

1 Answer 1

1

This worked for me

ProxyPass /examples http://127.0.0.1:8083/examples
ProxyPassReverse /examples http://127.0.0.1:8083/examples
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.