httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <>
Subject Re: [users@httpd] Servers listening for different ports question
Date Sat, 09 Sep 2006 18:30:28 GMT

On Sep 9, 2006, at 11:00 AM, Charles Michener wrote:

> I have an Apache server listening to port 80 and serving domains  
> 1,2,3,... To reduce the first server's load I would like to install  
> another server running Apache; I would like to set it up looking at  
> the same router and IP address but listening to a different port -  
> say 8080 - serving domains 20, 21, 22,...
> I understand that the new server would have an HPPTD.CONF file that  
> says LISTEN 8080 not LISTEN 80.

If you have only one IP address configured on the box, you'll have to  
put the second server on a different port, yes.

> My question is where do I tell the transferred domains - 20, 21,  
> 22,... that they should come in on 8080 not the default 80.

As Joshua points out, that doesn't work unless you can afford to have  
your users explicitly specify the port number in the URLs they access.

An alternative for you would be to have the second server bind to an  
additional IP address on the box. Like so:



<VirtualHost *:80>
     ServerName domain1

<VirtualHost *:80>
     ServerName domain2



<VirtualHost *:80>
     ServerName domain20

<VirtualHost *:80>
     ServerName domain21

This would cost you an extra outside IP address, but you'd get to use  
port 80. Of course your DNS would have to be set up so that clients  
hit the right IP addresses for the respective domains. You'd set the  
second IP up as an alias on the network interface (falls outside the  
scope of this list). Added bonus: if you ever decide to move that  
second server to a different box, you won't have to change DNS but  
just move the software configuration over.


PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF

View raw message