httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] Rewriting / proxy problem
Date Wed, 26 Mar 2003 14:15:07 GMT
Plain text please...

Check out - it looks like
apache will use DNS no matter what nsswitch.conf says. So you'll always
get a loop with this setup...

Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

>  -----Original Message-----
> From: 	Felix Planjer [] 
> Sent:	Mittwoch, 26. März 2003 14:57
> To:
> Subject:	[users@httpd] Rewriting / proxy problem
> Hi,
> I'm running RedHat Linux 8.0 with Apache 2.0.40. I'm trying to achieve
the following:
> We have a website with an external addres: 
> Since the "somepath" part is not running on our main server, we need
to proxy the url to another machine (on our intranet). BUT the hostname
in the proxied request should be the same as the hostname on the outside
(due to some bad coding on the site, which I have no control over).
> To accomplish this I added a line to the /etc/hosts file: 
> So it overrules the dns lookup of (which resolves
to the external address)
> And added the following in our httpd.conf (inside the default virtual
> 	RewriteRule ^/somepath(.*)$1
> The weird thing is, that it then proxies to the apache server instead
of the internal server. I get a proxy loop errors and see in the logs
that there are a lot of requests coming in from the machines own ip
> To verify the use of the etc/hosts file I added this entry to the
hosts file:
> dummyname
> And replaced the FQDN in the rewrite rule with dummyname. This made
the proxy'ing work but the site wasn't working because the hostname was
> It seems that mod_rewrite are resolving from dns first, and if that
fails from the /etc/hosts file. I expect it to be the other way around.
In the host.conf I have: order hosts,bind. BTW I get the same issues
when using ProxyPass instead of te rewriterules
> Can someone explain this or give me a solution?
> Felix Planjer
>  << File: ATT196728.txt >>

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message