No really sure whats happening when I try and reverse proxy but I keep getting Error 500. I have mod_proxy and mod_proxy_html enabled and my conf file for the reverse proxy looks as so:

    ProxyRequests Off
    ProxyPreserveHost On
    <Proxy *>
     Order deny,allow
     Allow from all
    ProxyPass /panel http://mydomain.com:8005/
    ProxyPassReverse /panel http://mydomain.com:8005/

I've tried pretty much everything as far as writing the reverse differently with and without the slashes. When I

    tail /var/log/apache2/error.log

    [Tue Dec 06 12:58:00 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Tue Dec 06 12:58:00 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
    [Tue Dec 06 12:58:00 2011] [notice] Digest: generating secret for digest authentication ...
    [Tue Dec 06 12:58:00 2011] [notice] Digest: done
    PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [Tue Dec 06 12:58:00 2011] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
    [Tue Dec 06 12:58:00 2011] [notice] mod_python: using mutex_directory /tmp
    [Tue Dec 06 12:58:00 2011] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Tue Dec 06 12:58:00 2011] [notice] Apache/2.2.20 (Ubuntu) DAV/2 mod_fcgid/2.3.6 Phusion_Passenger/2.2.11 PHP/5.3.6-13ubuntu3.2 with Suhosin-Patch proxy_html/3.0.1 mod_python/3.3.1 Python/2.7.2+ mod_ruby/1.2.6 Ruby/1.8.7(2011-06-30) mod_ssl/2.2.20 OpenSSL/1.0.0e configured -- resuming normal operations
  • 2
    Maybe the proxy is passing correctly, and it is the destination server that is giving the 500 error? What does the logs on the destination server look like? – Tim Dec 6 '11 at 19:18
  • 2
    Can you access from the proxy server mydomain.com:8005 URL? E.g. try with wget: wget -O - -S http://mydomain.com:8005/ or curl -i http://mydomain.com:8005/ – Mircea Vutcovici Dec 6 '11 at 20:05
  • Maybe a typo, maybe not, but there is no mod_proxy_html. In case you (tried to) enabled this ensure you don't get an error right there. It should be mod_proxy_http. – Chris Dec 6 '11 at 20:10
  • Okay, thanks @Chris not sure why I wasn't noticing that. – Bobby Dec 6 '11 at 21:38

Make sure mod_proxy and mod_proxy_http are loaded.

|improve this answer|||||

In a reverse proxy, ProxyRequests should be set to off. See the mod_proxy documentation.

|improve this answer|||||
  • Sorry I wrote it on here wrong, ProxyRequests is set to off. Also the other server isn't even showing that a connection attempt is being made. – Bobby Dec 6 '11 at 19:54
  • How do you know that the connections is not made? Are you using a network sniffer like WireShark between proxy and web server? – Mircea Vutcovici Dec 6 '11 at 19:59
  • I am running a Tornado Web Server. So right now I am starting the server in a terminal which will show any type of requests made to the server. If I go to the server on its own port it shows the request was accepted with no error, if I go through the reverse proxy the Tornado server shows nothing but the website throws up a Error 500 – Bobby Dec 6 '11 at 20:02

A couple of possibilities:

I know it sounds simple but this could be DNS issue.

Is mydomain.com resolvable from the proxy?

From the proxy ping mydomain.com. What IP does it resolve to and is port 8005 open on that IP address.

I typicall eliminate DNS by using IPs when possible while debugging.

Also, try turning ProxyPreserveHost off. I am not familar with your backend server but perhaps it does not respond if the Host: doe not match the IP domain it is configured to use.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.