I have a small windows server set up on a LAN, with static IP address 192.168.1.100. I have a few other client machines, say 192.168.1.101 - 104.
- Host an apache server (wampserver) on the main server, accessible only on the LAN.
- Set up the default wampserver tools (such as phpmyadmin) on port 8080, accessible only from the server machine
- Use port 8081 for a special internal site, accessible by all machines on the LAN
My current setup as follows:
ServerRoot "c:/wamp/bin/apache/apache2.2.22" Listen 8080 Listen 8081 ServerAdmin admin@localhost ServerName localhost:8080 DocumentRoot "c:/wamp/www/" <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "c:/wamp/www"> Options Indexes FollowSymLinks AllowOverride all Order deny,allow Deny from all Allow from 192.168.1 </Directory> <Directory "c:/site1"> Options Indexes FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 192.168.1 </Directory> <Directory "cgi-bin"> AllowOverride None Options None Order deny,allow Deny from all Allow from 192.168.1 </Directory>
Listen 8080 Listen 8081 NameVirtualHost *:8080 NameVirtualHost *:8081 <VirtualHost *:8080> ServerName localhost DocumentRoot c:/wamp/www </VirtualHost> <VirtualHost *:8081> ServerName site1 DocumentRoot c:/site1 </VirtualHost>
- I have opened up port 8081 on the windows server
- I have added "site1" to point to 192.168.1.100 on the hosts files of the client machines
I have added an alias on the server
Alias /site1/ "c:/site1/"
Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny Allow from all
The problem now is that the behaviour is not quite what I need.
Current behaviour on the server:
192.168.1.100:8081also serves me
c:/site1that I expect
Current behaviour on client machines:
site1:8081(or 192.168.1.100:8081) serves me the
c:/wamp/wwwon the server, instead of
c:/site1that I expect. I don't want c:/wamp/www accessible from clients.
site1:8081/site1(or 192.168.1.100:8081/site1) serves me the
c:/site1on the server.
What am I doing wrong?