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.
Requirements:
- 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:
httpd.conf:
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>
httpd-vhosts.conf:
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:8080
serves mec:/wamp/www
as expected192.168.1.100:8081
also serves mec:/wamp/www
instead ofc:/site1
that I expect- instead,
192.168.1.100:8081/site1
serves mec:/site1
Current behaviour on client machines:
site1:8081
(or 192.168.1.100:8081) serves me thec:/wamp/www
on the server, instead ofc:/site1
that I expect. I don't want c:/wamp/www accessible from clients.- instead,
site1:8081/site1
(or 192.168.1.100:8081/site1) serves me thec:/site1
on the server.
What am I doing wrong?