Thanks for the tip. I prefer that way. The final config is: Server 1 NameVirtualHost *:80 <VirtualHost *:80> ServerName server.mydomain.com ProxyPreserveHost On RewriteEngine On RewriteRule ^/(.*) http://60.234.nnn.nn:8008/$1 [L,P] </VirtualHost> <VirtualHost *:80> ServerName otherserver.mydomain.com ProxyPreserveHost On RewriteEngine On RewriteRule ^/(.*) http://60.234.nnn.nn:8008/$1 [L,P] </VirtualHost> Server2 NameVirtualHost *:8008 <VirtualHost *:8008> ServerName server.mydomain.com DocumentRoot /var/www/html </VirtualHost> <VirtualHost *:8008> ServerName otherserver.mydomain.com DocumentRoot /var/www/html2 </VirtualHost> Hope this helps someone. Cameron----- Original Message ----- From: "Krist van Besien" <krist.vanbesien@xxxxxxxxx>
To: <users@xxxxxxxxxxxxxxxx>; "Cameron Beattie" <ext_news@xxxxxxxxxxxx> Sent: Monday, July 04, 2005 10:33 PMSubject: Re: [users@httpd] RewriteRule question: forward requests from one Apache server to another
On 6/29/05, Cameron Beattie <kjcsb@xxxxxxxxxxxx> wrote:
For those interested, I ended up using different ports to achieve the desired result. There may be a better way but this works for me:
Good that it works now, but your original setup would have worked had you added:
ProxyPreserveHost On to your config. WIth this option the original "Host" header is preserved, and the internal server can than select the correct virtual host based on it. Krist -- krist.vanbesien@xxxxxxxxx Solothurn, Switzerland --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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