I'm running Apache on a Mac, with 4 websites on it.
Up until recently, it has been directly connected to my DSL modem, with the fixed IP my ISP gave me. This works fine - the 4 sites are defined in the httpd.conf file, and they're all OK.
I am trying to put a Linksys wireless router into the mix now, and have a problem.
Here's what I have done, and what works;
I have put the fixed IP address into the router, set the DHCP range to start from x.x.x.101 for DHCP clients. I have set the webserver with a fixed IP of x.x.x.100 (it's 192.168.1.100, but I'll use x to save keep typing it).
I have forwarded ports 80 and 21 on the router for ip 100 (the server).
The router is giving IP addresses to clients, they're connecting to the internet OK. The server is also connecting OK.
What isn't working - if I try to navigate to any of my 4 sites, using a browser, the server is pointing to the wrong place - it's pointing to macharddisk/library/webserver/documents which if I recall is the Apache default.
The server directives in httpd.conf (which work with the direct connection) are on another hard disk.
So, for any of the sites, it just points at that location. It seems to ignore the httpd.conf file.
I have altered the httpd.conf file from the ISP ip address to 192.168.1.100
It looks something like below, but pointing a browser at any of the sites just goes to the one I have temporarily put in the webserver/documents directory:
NameVirtualHost 192.168.1.100
<VirtualHost ServerName DocumentRoot /volumes/data/web/site1
</VirtualHost>
<VirtualHost ServerName DocumentRoot /volumes/data/web/site2
</VirtualHost>
<VirtualHost ServerName DocumentRoot /volumes/data/web/site3
</VirtualHost>
<VirtualHost ServerName DocumentRoot /volumes/data/web/site4
</VirtualHost>
Any ideas? TIA
Up until recently, it has been directly connected to my DSL modem, with the fixed IP my ISP gave me. This works fine - the 4 sites are defined in the httpd.conf file, and they're all OK.
I am trying to put a Linksys wireless router into the mix now, and have a problem.
Here's what I have done, and what works;
I have put the fixed IP address into the router, set the DHCP range to start from x.x.x.101 for DHCP clients. I have set the webserver with a fixed IP of x.x.x.100 (it's 192.168.1.100, but I'll use x to save keep typing it).
I have forwarded ports 80 and 21 on the router for ip 100 (the server).
The router is giving IP addresses to clients, they're connecting to the internet OK. The server is also connecting OK.
What isn't working - if I try to navigate to any of my 4 sites, using a browser, the server is pointing to the wrong place - it's pointing to macharddisk/library/webserver/documents which if I recall is the Apache default.
The server directives in httpd.conf (which work with the direct connection) are on another hard disk.
So, for any of the sites, it just points at that location. It seems to ignore the httpd.conf file.
I have altered the httpd.conf file from the ISP ip address to 192.168.1.100
It looks something like below, but pointing a browser at any of the sites just goes to the one I have temporarily put in the webserver/documents directory:
NameVirtualHost 192.168.1.100
<VirtualHost ServerName DocumentRoot /volumes/data/web/site1
</VirtualHost>
<VirtualHost ServerName DocumentRoot /volumes/data/web/site2
</VirtualHost>
<VirtualHost ServerName DocumentRoot /volumes/data/web/site3
</VirtualHost>
<VirtualHost ServerName DocumentRoot /volumes/data/web/site4
</VirtualHost>
Any ideas? TIA