1

I am trying to do reverse proxy with configuration

<ifModule mod_proxy.c>
ProxyRequests On

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

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

ProxyVia On

<IfModule mod_disk_cache.c>
   CacheEnable disk /
   CacheRoot "/var/cache/mod_proxy"
</IfModule>

</IfModule>

But when I try to access http://domainname.com I am getting following error on browser ...

The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Any help is highly appreciated

0

3 Answers 3

1

Looks like it's something to do with redirect or URL rewrite. If you go to http://localhost:8080/mysocial did you get redirected to http://domainname.com or any other URL ?

0

Try using these directives:

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

Instead of the ones you are using.

0

I'm no Apache httpd expert but I did setup a similar thing and the syntax of your configuration looks kind of strange to me.

first of all ProxyRequests should probably not be on. "ProxyRequests On" allows for forwarding redirects and not reverse proxying see: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyrequests

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

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

i haven't used a cache when setting up a proxy but I guess that part should look something like this

<IfModule mod_disk_cache.c>
    CacheEnable disk /
    CacheRoot "/var/cache/mod_proxy"
</IfModule>

excerpts from your error and maybe access logs might help too to debug this problem.

You must log in to answer this question.