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 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

share|improve this question

migrated from stackoverflow.com Oct 25 '10 at 0:34

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers

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 ?

share|improve this answer
add comment

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.

HTH Marcel

share|improve this answer
add comment

Try using these directives:

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

Instead of the ones you are using.

share|improve this answer
add comment

Your Answer

 
discard

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