<VirtualHost *:80> ServerName aviatechno DocumentRoot G:/www/aviatechno ServerAdmin webmaster@aviatechno.net ErrorLog "J:/Wamp/logs/aviatechno_error.log" <Directory "G:/www/aviatechno/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Require local </Directory> </VirtualHost> <VirtualHost *:80> ServerName dev.aviatechno.net DocumentRoot G:/www/aviatechno ServerAdmin webmaster@aviatechno.net ErrorLog "J:/Wamp/logs/aviatechno_error.log" <Directory "G:/www/aviatechno/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Require local </Directory> </VirtualHost>
Order deny, allow deny from all allow from 127.0.0.1 localhost 192.168
<IfModule dir_module> DirectoryIndex index.php index.php3 index.html index.htm </IfModule>S'i il en manque - et à part cas très particulier pour un seul site virtuel - c'est là qu'il faut les ajouter.
Listen 0.0.0.0 ou Listen 127.0.0.1
Listen 8001 .... .... Listen 127.0.0.1:8001Une duplication de port de ce genre ne fonctionnera pas et peut même empêcher Apache de démarrer.
127.0.0.1 monsite.com monsite.fr ::1 monsite.com monsite.frAjouté dans J:\wamp\bin\apache\Apache2.4.6\conf\extra\httpd-vhosts.conf
<VirtualHost *:80> ServerName monsite.com DocumentRoot G:/www/le.pointu ErrorLog "J:/Wamp/logs/lepointu_error.log" <Directory "G:/www/le.pointu/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Require local </Directory> </VirtualHost> <VirtualHost *:80> ServerName monsite.fr DocumentRoot G:/www/le.pointu ErrorLog "J:/Wamp/logs/lepointu_error.log" <Directory "G:/www/le.pointu/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Require local </Directory> </VirtualHost>Et [monsite.fr] ou [monsite.com] ouvre bien le même site, mais le referer est bien différencié.