You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by nick travis <li...@wormfishin.com> on 2003/10/03 17:01:54 UTC

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


Re: [users@httpd] multiple web servers

Posted by Mark McCulligh <mm...@visualtech.ca>.
My two cents on how I would do it.
Setup each server with it's own web server, of course with different IP
address. Then open port 80 on both IP address.  Then use your DNS server to
link the domain names to the right IP address. Plus of course each server
will have it's own virtual hosts.

Mark.

----- Original Message ----- 
From: "nick travis" <li...@wormfishin.com>
To: <us...@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
> 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


Re: [users@httpd] multiple web servers

Posted by Leif W <wa...@usa.net>.
----- Original Message ----- 
From: "nick travis" <li...@wormfishin.com>
To: <us...@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


Re: [users@httpd] multiple web servers

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 3 Oct 2003, nick travis wrote:

> 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
> know how do do virtual hosts on the same machine, but i don't know how
> to redirect to another server.

Yes, this can be done.  See the directives ProxyPass and ProxyPassReverse.

Of course, the more efficient thing to do would be for your firewall to
forward to the correct machines.

Joshua.

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