• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

mod_proxy: reverse proxy in Plesk-controlled apache server returns HTTP 500

ronv

Basic Pleskian
Hi,

I'm trying to configure reverse proxy rules in vhost.conf. I have Apache-2.2.8 on Ubuntu-8.04 (monitored by Plesk-10.4.4). I'm encountering a HTTP 500 error, which I don't see with exactly the same configuration on my local system. Could there be any Plesk-specific issues involved that need to be addressed to allow for reverse proxying?

What I'm trying to achieve is defining a reverse proxy rule that defers all traffic to -say- <http://mydomain/tomcat/> to the Tomcat server running on port 8080. I have mod_rewrite and mod_proxy loaded in Apache. As far as I understand mod_proxy docs, entering following rules in /var/www/vhosts/mydomain/conf/vhost.conf should work:

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

RewriteEngine on
ProxyRequests off
RewriteRule ^/tomcat/(.*)$ http://mydomain:8080/$1 [P]

(Note: I tested with a RewriteRule directive to get at least some logging.) Yet, I am getting a HTTP 500: internal server error when requesting above URL.

I have made mod_rewrite log extensively, and find following entries in the logs:

81.241.230.23 - - [19/Mar/2012:16:42:59 +0100] [mydomain/sid#b06ab8][rid#1024af8/initial] (2) init rewrite engine with requested uri /tomcat/testApp/
81.241.230.23 - - [19/Mar/2012:16:42:59 +0100] [mydomain/sid#b06ab8][rid#1024af8/initial] (3) applying pattern '^/tomcat/(.*)$' to uri '/tomcat/testApp/'
81.241.230.23 - - [19/Mar/2012:16:42:59 +0100] [mydomain/sid#b06ab8][rid#1024af8/initial] (2) rewrite '/tomcat/testApp/' -> 'http://mydomain:8080/testApp/'
81.241.230.23 - - [19/Mar/2012:16:42:59 +0100] [mydomain/sid#b06ab8][rid#1024af8/initial] (2) forcing proxy-throughput with http://mydomain:8080/testApp/
81.241.230.23 - - [19/Mar/2012:16:42:59 +0100] [mydomain/sid#b06ab8][rid#1024af8/initial] (1) go-ahead with proxy request proxy:http://mydomain:8080/testApp/ [OK]

This suggests that the rewrite and proxy part are processed ok; still the proxied request produces a 500 error. Addressing the testApp directly via <http://mydomain:8080/testApp> does work, and the same setup does work on my local computer. Also, defining a proxy rule to another domain gives the same result, e.g:
ProxyPass /google/ http://www.google.be/
ProxyPassReverse /google/ http://www.google.be/
Gives the same HTTP 500 error for requests for <http://mydomain/google/>.

Does anyone have an idea what might be wrong, or how I at least can get more useful information than 'internal server error' (apart from above rewrite logs, I can't find any trace of this request in any other logs, which is quite maddening).

I'm rather desperate, any pointers much appreciated!

Ron
 
FWI, it appeared that I had overlooked to enable mod_proxy_http in Plesk's Apache server. Hence, the issue could be fixed by enabling mod_proxy_http (alongside mod_proxy).

Ron
 
Back
Top