httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leif W" <warp-...@usa.net>
Subject Re: [users@httpd] multiple web servers
Date Fri, 03 Oct 2003 15:34:19 GMT
----- Original Message ----- 
From: "nick travis" <linuxnews@wormfishin.com>
To: <users@httpd.apache.org>
Sent: Friday, October 03, 2003 11:01 AM
Subject: [users@httpd] multiple web servers


> I need to run 2 web servers, on different machines, and I'm not sure of
> the best way to do this.  I currently have my firewall forwarding all
> port 80 traffic to web server 1, can I use a virtual host on web server
> 1 that will point request for a specific hostname to web server 2?  I

Yes and no.  You can only forward all port 80 traffic to one computer, so
you can't just do a simple redirect to a second server at port 80 behind the
firewall.  You'd have to forward all traffic for say port 81 (or 8080 or
something), to server2 on the second machine, and then if you're capturing
requests for server2 on port 80 on server1 with a VirtualHost block (see
below), you can use a permanent redirect to server2.  This assumes that the
firewall has the single external IP, and that both server1 and server2 both
resolve to this IP, and that you have port 80 forwarding to server1 and port
81 forwarding to server2.

========
server1
========

NameVirtualHost *:80

<VirtualHost *:80>

    ServerName server1

</VirtualHost>

<VirtualHost *:80>

    ServerName server2
    RedirectPermanent / http://server2:81/

</VirtualHost>

========
server2
========

NameVirtualHost *:81

<VirtualHost *:81>

    ServerName server2

</VirtualHost>

> know how do do virtual hosts on the same machine, but i don't know how
> to redirect to another server.
>
> Thanks
> Nick
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> If you have any questions please contact nick@precisionmillworks.com
> Mailscanner thanks transtec Computers for their support.
>
>
> ---------------------------------------------------------------------
> 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
>
>
>



---------------------------------------------------------------------
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