Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 68372 invoked from network); 2 Mar 2010 16:07:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Mar 2010 16:07:17 -0000 Received: (qmail 27912 invoked by uid 500); 2 Mar 2010 16:07:10 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 27891 invoked by uid 500); 2 Mar 2010 16:07:10 -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: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 27876 invoked by uid 99); 2 Mar 2010 16:07:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Mar 2010 16:07:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.219.75.105] (HELO smtp2.acotelsa.com) (195.219.75.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Mar 2010 16:06:58 +0000 Received: from [10.75.50.133] (unknown [195.219.75.1]) by smtp2.acotelsa.com (Postfix) with ESMTP id EA83E27DF0 for ; Tue, 2 Mar 2010 17:06:33 +0100 (CET) Message-ID: <4B8D3796.1020504@acotelsa.com> Date: Tue, 02 Mar 2010 17:06:46 +0100 From: =?ISO-8859-1?Q?Daniel_L=F3pez_Robles?= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: "users@httpd.apache.org" Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Acotelsa-MailScanner-ESVA-Watermark: 1268150799.43547@I7CKaC13dkam137b0HC67Q X-Acotelsa-MailScanner-ESVA-Information: Please contact for more information X-Acotelsa-MailScanner-ESVA-ID: EA83E27DF0.1A6D5 X-Acotelsa-MailScanner-ESVA: Found to be clean X-Acotelsa-MailScanner-ESVA-From: dalopez@acotelsa.com X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No Subject: [users@httpd] Reverse proxy with mod_rewrite using RewriteRule [P] Hello: We have two Apaches in a server: Apache 2.2.14, reverse proxy, listening to IP 192.168.24.X Apache 2.2.11, which actually serves the websites, listening to IP 192.168.24.Y Domain name proxy.mysite.es points to our reverse proxy Apache, and we need it to send requests to the other Apache in this way: http://proxy.mysite.es/something -> http://something.mysite.es Our rewrite rule: RewriteRule ^/(.*) http://$1.mysite.es/ [L,P] In RewriteLog we can see that the rewrite rule is working fine up to some point: 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#eef078/initial] (2) init rewrite engine with requested uri /something 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#eef078/initial] (3) applying pattern '^/(.*)' to uri '/something' 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#eef078/initial] (2) rewrite '/something' -> 'http://something.mysite.es/' 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#eef078/initial] (2) forcing proxy-throughput with http://something.mysite.es/ 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#eef078/initial] (1) go-ahead with proxy request proxy:http://something.mysite.es/ [OK] Good, that is what we want, but it seems like something.mysite.es is not being sent to the Apache 2.2.11 but to the reverse proxy Apache itself, because the log follows: 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#ef3088/initial] (2) init rewrite engine with requested uri /public/index.aspx 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#ef3088/initial] (3) applying pattern '^/(.*)' to uri '/public/index.aspx' 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#ef3088/initial] (2) rewrite '/public/index.aspx' -> 'http://public/index.aspx.mysite.es/' 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#ef3088/initial] (2) forcing proxy-throughput with http://public/index.aspx.mysite.es/ 192.168.24.X - - [02/Mar/2010:15:46:19 +0100] [pre.mysite.es/sid#db73a0][rid#ef3088/initial] (1) go-ahead with proxy request proxy:http://public/index.aspx.mysite.es/ [OK] Which of course leads to failure because of not being able to resolve domain name "public". A ping to something.mysite.es shows that it is being resolved to 192.168.24.Y, which is correct. Any clue? Thank you very much. Daniel Protecci�n de Datos: ACOTELSA le informa de que los datos facilitados por Ud. y utilizados para el env�o de esta comunicaci�n ser�n objeto de tratamiento automatizado o no en nuestros ficheros, con la finalidad de gestionar la agenda de contactos de nuestra empresa y para el env�o de comunicaciones profesionales por cualquier medio electr�nico o no. Vd. podr� en cualquier momento ejercer el derecho de acceso, rectificaci�n, cancelaci�n y oposici�n en los t�rminos establecidos en la Ley Org�nica 15/1999. El responsable del tratamiento es ACOTELSA, con domicilio en Ronda de Poniente, 3 bajo, 28760 Tres Cantos, Madrid. Confidencialidad El contenido de esta comunicaci�n, as� como el de toda la documentaci�n anexa, es confidencial y va dirigido �nicamente al destinatario del mismo. En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucci�n. Gracias. Confidenciality The content of this communication and any attached information is confidential and exclusively for the use of the addressee. If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it. Thank you. --------------------------------------------------------------------- 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