httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard van der Walt <richard.vdw...@stracienta.com>
Subject [users@httpd] Proxy Error 502 on one vhost and not the second
Date Mon, 03 May 2010 19:56:09 GMT
Good day there.

I'm using mod_proxy to redirect trafic to java applications running on
JBoss instances. I have 3 JBoss instances running seperate apps, the
redirects of 2 of these works fine with mod_proxy configuration but
the third doesn't.

The first 2 instances where set up a long time ago. I've used the one
instance's configuration file for the third one as it was close to
what I required. Here's the 2 configurations.

Working:

<VirtualHost *:80>
    ServerAdmin developers@company.com
    ServerName sub.domain1.com
    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass / http://sub.domain1.com:18080/
    ProxyPass /media !
    ProxyPassReverse / http://sub.domain1.com:18080/
    ErrorLog /var/log/apache2/domain1-error_log
    CustomLog /var/log/apache2/domain1-access_log combined
    <Directory "/srv/www/vhosts/domain1">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

The one not working:

<VirtualHost *:80>
    ServerAdmin developers@company.com
    ServerName sub.domain2.com
    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass / http://sub.domain2.com:28080/
    #ProxyPass /media !
    ProxyPassReverse / http://sub.domain2.com:28080/
    ErrorLog /var/log/apache2/domain2-error_log
    CustomLog /var/log/apache2/domain2-access_log combined

    <Directory "/srv/www/vhosts/domain2">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

The one that's not working I can browse to
http://sub.domain2.com:28080 without a problem but when I try to
navigate to http://sub.domain2.com I get the following error
irrespective of whether the server it's redirecting to is started or
not.

"
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: DNS lookup failure for: sub.domain2.com

Additionally, a 502 Bad Gateway error was encountered while trying to
use an ErrorDocument to handle the request.
"

I'm running on a SuSE and Apache 2.2.4 environment.

Mod_Proxy is loading properly as is evident by the already working
instances. I'm either missing the mistake in the vhost directive or
forgot about a configuration in another file.

Regards
--
Richard van der Walt
Product Development
Stracienta SA (Pty) Ltd.

E-mail: richard.vdwalt@stracienta.com

E-mail legal disclaimer: http://www.stracienta.com/disclaimer.html

www.stracienta.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message