Re: Proxy Error 502 on one vhost and not the second

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Contact who ever is maintaining the DNS server in your company and ask them to add an alias for sub.domain2.com pointing to the same IP address as sub.domain1.com.

Actually this is wrong. Should be contact who ever is maintaining the DNS server in your company and ask them to add proper DNS record for sub.domain2.com

Igor


On Tue, May 4, 2010 at 11:13 AM, Igor Cicimov <icicimov@xxxxxxxxx> wrote:
Obviously as the error says you have DNS problem. Apache can not resolve sub.domain2.com into IP address. Contact who ever is maintaining the DNS server in your company and ask them to add an alias for sub.domain2.com pointing to the same IP address as sub.domain1.com.

Igor


On Tue, May 4, 2010 at 5:56 AM, Richard van der Walt <richard.vdwalt@xxxxxxxxxxxxxx> wrote:
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@xxxxxxxxxxx
    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@xxxxxxxxxxx
    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@xxxxxxxxxxxxxx

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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux