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 Re: [users@httpd] Proxy Error 502 on one vhost and not the second
Date Tue, 04 May 2010 08:13:10 GMT
Hi there

Thanks for your replies, it helped pointing me into the correct
direction. As said on the initial post I could navigate with my
browser to http://sub.domain.com:28080/. However the server itself
can't resolve the sub domain 2. I've added it to the hosts file and
will restart the server this afternoon after core business hours when
all the clients are not working anymore.

Thanks a lot
Richard

On 4 May 2010 03:27, Igor Cicimov <icicimov@gmail.com> wrote:
> You can also resolve it locally on the Suse server in /etc/hosts file if you
> know the ip_address of the sub.domain2.com
>
> ip_address   subdomain2   sub.domain2.com
>
> and make sure that the name resolution for hosts in the /etc/nsswitch.conf
> file is
>
> hosts:      files dns
>
> Igor
>
> On Tue, May 4, 2010 at 11:16 AM, Igor Cicimov <icicimov@gmail.com> wrote:
>>>
>>> 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@gmail.com> 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@stracienta.com> 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@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
>>>>
>>>
>>
>
>



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

Company Tel: +27 (0)11 790 0900
Direct Phone: +27 (0)11 790 0905
Mobile: +27 82 318 6057
Fax: +27 (0)11 465 5977

Skype: vdwaltr
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