http://mongrel.rubyforge.org/docs/apache.html
I started Mongrel and can hit it directly (via port 8000) just fine. My Apache virtual host configuration looks like this:
<VirtualHost *>
ServerName xxxxxx.com
ServerAlias www.xxxxx.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://xx.xx.xx.xx:8000/
ProxyPassReverse / http://xx.xx.xx.xx:8000/
# ProxyPreserveHost on
LogLevel debug
</VirtualHost>
I've tried my static IP address, the domain name, localhost, 127.0.0.1 -- in every case, the web browser gets a 503 error, and the Apache error log includes the following:
[Mon Feb 11 23:16:26 2008] [debug] mod_proxy_http.c(54): proxy: HTTP: canonicalising URL //xx.xx.xx.xx:8000/
[Mon Feb 11 23:16:26 2008] [debug] proxy_util.c(1336): [client yy.yy.yy.yy] proxy: http: found worker http://xx.xx.xx.xx:8000/ for http://xx.xx.xx.xx:8000/
[Mon Feb 11 23:16:26 2008] [debug] mod_proxy.c(777): Running scheme http handler (attempt 0)
[Mon Feb 11 23:16:26 2008] [debug] mod_proxy_http.c(1662): proxy: HTTP: serving URL http://xx.xx.xx.xx:8000/
[Mon Feb 11 23:16:26 2008] [debug] proxy_util.c(1697): proxy: HTTP: retrying the worker for (xx.xx.xx.xx)
[Mon Feb 11 23:16:26 2008] [debug] proxy_util.c(1703): proxy: HTTP: worker for (xx.xx.xx.xx) has been marked for retry
[Mon Feb 11 23:16:26 2008] [debug] proxy_util.c(1756): proxy: HTTP: has acquired connection for (xx.xx.xx.xx)
[Mon Feb 11 23:16:26 2008] [debug] proxy_util.c(1817): proxy: connecting http://xx.xx.xx.xx:8000/ to xx.xx.xx.xx:8000
[Mon Feb 11 23:16:26 2008] [debug] proxy_util.c(1913): proxy: connected / to xx.xx.xx.xx:8000
[Mon Feb 11 23:16:26 2008] [debug] proxy_util.c(2008): proxy: HTTP: fam 2 socket created to connect to xx.xx.xx.xx
[Mon Feb 11 23:17:11 2008] [error] (110)Connection timed out: proxy: HTTP: attempt to connect to xx.xx.xx.xx:8000 (67.228.132.192) failed
[Mon Feb 11 23:17:11 2008] [error] ap_proxy_connect_backend disabling worker for (xx.xx.xx.xx)
[Mon Feb 11 23:17:11 2008] [debug] proxy_util.c(1774): proxy: HTTP: has released connection for (xx.xx.xx.xx)
And yet, if I replace the proxy configuration with the following:
ProxyPass / http://www.google.ca/
ProxyPassReverse / http://www.google.ca/
that works fine! I see Google's web site under my domain.
Also, this same set up works on my own machine, running the same version of Ubuntu as is on our VPS.
So it seems like I'm missing some small but important detail or else something is broken. I've been at this for hours so I'd love to hear any ideas.
Thanks!