httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mickael Delahaye" <mickael_delah...@sbcglobal.net>
Subject Re: [users@httpd] Apache : 2 servers for one IP address
Date Sat, 10 Apr 2004 00:43:46 GMT
Thanks a bunch, it worked great. The problem I have now is that since it's
redirecting all the requests from the first computer to the other one, the
SQL Query that I have (I use PHP & MySQL to count how many hits each website
gets by recording the IP address) only returns the first computer's IP
address (192.168.2.2). Is there anyway to go avoid this ?

Thanks


----- Original Message -----
From: "Joshua Slive" <joshua@slive.ca>
To: <users@httpd.apache.org>
Sent: Friday, April 09, 2004 9:08 AM
Subject: Re: [users@httpd] Apache : 2 servers for one IP address


>
> On Fri, 9 Apr 2004, Mickael Delahaye wrote:
> > I currently have 2 computers that each host a different website, but
> > only one fixed IP address. I know it would be easier to have both
> > websites on the same computer, but for some reasons I have to have it on
> > 2 different ones. The problem is that the second computer is obviously
> > outside of the Documentroot so all the requests that come to the apache
> > server (hosted on computer one) do not go through. What are my options ?
> > Do I need to create an alias (like Alias /doc //computer2/docs ?)
>
> If you can mount the filesystem from computer2 on computer 1, then that
> should work.  That is not really two different servers, it is simply one
> server mounting content from two different places.  Exactly how you would
> mount the filesystem depends on your OS and other local details.
>
> Alternatively, if you actually want to run a webserver on computer2, you
> can have computer one proxy the requests back.  For example:
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
> ServerName name1.example.com
> DocumentRoot /local/path
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerName name2.example.com
> ProxyPass / http://server2/
> ProxyPassReverse / http://server2/
> </VirtualHost>
>
> Where I am assuming that you have internal DNS set up so that server2 can
> be reached from server1 under that name.
>
> 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


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