Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 5100 invoked by uid 500); 28 Mar 2003 15:45:52 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 5085 invoked from network); 28 Mar 2003 15:45:52 -0000 Received: from spitfire.velocet.net (216.138.223.227) by daedalus.apache.org with SMTP; 28 Mar 2003 15:45:52 -0000 Received: from mail.gej-it.com (H213.C220.tor.velocet.net [216.138.220.213]) by spitfire.velocet.net (Postfix) with ESMTP id 65FEC4B7E89 for ; Fri, 28 Mar 2003 10:45:49 -0500 (EST) Received: from WorldClient ([127.0.0.1]) by gej-it.com ([216.138.220.213]) with SMTP (MDaemon.PRO.v6.7.2.R) for ; Fri, 28 Mar 2003 10:45:43 -0500 Received: from [216.138.220.213] via WorldClient with HTTP; Fri, 28 Mar 2003 10:45:42 -0500 Date: Fri, 28 Mar 2003 10:45:42 -0500 From: "Jeff Cohen" To: users@httpd.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Message-ID: X-Mailer: WorldClient 6.7.2 In-Reply-To: References: X-Authenticated-Sender: lists@gej-it.com X-MDRemoteIP: 127.0.0.1 X-Return-Path: lists@gej-it.com X-MDaemon-Deliver-To: users@httpd.apache.org X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: RE: [users@httpd] Rewriting / proxy problem If Owen said it should work then listen to him. Jeff Cohen -----Original Message----- From: Felix Planjer To: users@httpd.apache.org Date: Fri, 28 Mar 2003 09:18:29 +0100 Subject: RE: [users@httpd] Rewriting / proxy problem > Can someone confirm/deny that apache will always use DNS, and not the > hosts > file? > Is there any way I can make this situation work? > > thanks, > > Felix > > > -----Original Message----- > > From: Boyle Owen [mailto:Owen.Boyle@swx.com] > > Sent: Wednesday, March 26, 2003 3:15 PM > > To: users@httpd.apache.org > > Subject: RE: [users@httpd] Rewriting / proxy problem > > > > > > Plain text please... > > > > Check out http://httpd.apache.org/docs/dns-caveats.html - it looks > like > > apache will use DNS no matter what nsswitch.conf says. So you'll > always > > get a loop with this setup... > > > > Rgds, > > Owen Boyle > > Disclaimer: Any disclaimer attached to this message may be ignored. > > > > > -----Original Message----- > > > From: Felix Planjer [mailto:Felix.Planjer@YellowRed.nl] > > > Sent: Mittwoch, 26. M�rz 2003 14:57 > > > To: users@httpd.apache.org > > > 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: > > mysite.mydomain.com/somepath/. > > > 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: > > > 192.168.100.39 mysite.mydomain.com > > > So it overrules the dns lookup of mysite.mydomain.com (which > resolves > > to the external address) > > > > > > And added the following in our httpd.conf (inside the default > virtual > > host): > > > RewriteRule ^/somepath(.*) http://mysite.mydomain.com/somepath$1 > > [P] > > > > > > 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 > > address. > > > > > > To verify the use of the etc/hosts file I added this entry to the > > hosts file: > > > 192.168.100.39 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 > > wrong. > > > > > > 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 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 > > > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server > Project. > See 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 --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See 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