httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: Re : Re: Re : Re: 2 httpds on 1 server
Date Tue, 11 Dec 2001 14:03:07 GMT
Michael Reutter wrote:
> 
> >> you mean it is possible to do it the other way??? (would be great)
> >> but how can apache distinguish between the requests?
> >> one request goes to "webserver" and IP 10.0.0.1 and the other one goes to "webserver"
and IP 10.0.0.2 - IMO it would work, if the requests do not go to "webserver", but to the
IP itself (using http://10.0.0.2 instead of http://webserver)
> 
> ... the name is resolved (not randomly, but in rotation) by the DNS - and the request
goes to the specific IP (to different machines in the future - but I have to simulate it now
with only ONE machine!!!)

Leaving aside the issue of why you want alternate visitors to your site
to get a different page... I would proceed as follows:

- If you have no problems with using port 80, stick to that port -
everyone else does :-) (The only reason you might NOT want to use port
80 is if you don't want to start apache as root - then you have to use a
high-numbered port > 1024. But this is only commonly done in an intranet
environment). 

- simply attach your sites to the distinct IP addresses using IP-based
virtual hosts; Something like:

Listen 192.168.1.1:80
<VirtualHost 192.168.1.1:80>
  DocumentRoot /path/to/site_1
  ServerName   webserver
  ... other directives
</VirtualHost>

Listen 192.168.1.2:80
<VirtualHost 192.168.1.2:80>
  DocumentRoot /path/to/site_2
  ServerName   webserver
  ... other directives
</VirtualHost>

Since the ServerName directives are in distinct VH containers, they will
not collide. Both sites are now handled by the same instance of apache.

Congratulations, this is the weirdest set-up I've ever come across. When
you get it working, please post your URL so I can visit your
schizophrenic site ;->

Rgds,

Owen Boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message