#Listen 12.34.56.78:80 Listen 0.0.0.0:80 Listen [::0]:80 Listen 0.0.0.0:8000 Listen [::0]:8000Suggestion de fichier httpd-vhosts.conf
# # Virtual Hosts # # Always keep localhost, and always first in the list # this way a ramdom look at your IP address from an external IP # maybe a hack, will get told access denied <VirtualHost *:80> ServerName localhost DocumentRoot c:/wamp/www <Directory "c:/wamp/www/"> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost> # The normal Vhost definition for one of our sites <VirtualHost *:80> ServerName example.local DocumentRoot "d:/websrc/example/www" <Directory "d:/websrc/example/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost> # Access example.dev from phone for testing <VirtualHost *:8000> ServerName example.local DocumentRoot "d:/websrc/example/www" <Directory "d:/websrc/example/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local # assuming yoursubnet is 192.168.0.? # allow any ip on your WIFI access Require ip 192.168.0 </Directory> </VirtualHost>
<VirtualHost *:${MYPORT8000}> ServerName example.local DocumentRoot "d:/websrc/example/www" <Directory "d:/websrc/example/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> </VirtualHost>Il vous faudra ajouter « à la main » le Require supplémentaire :
<VirtualHost *:${MYPORT8000}> ServerName example.local DocumentRoot "d:/websrc/example/www" <Directory "d:/websrc/example/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local # en supposant que votre réseau local est 192.168.0 # autoriser n'importe quelle ip de votre réseau local, WIFI Require ip 192.168.0 </Directory> </VirtualHost>