mardi 27 mai 2014

Apache - création de Sites virtuels multiples sur un WAMP - Stack Overflow


I'm trying to host multiple sites on my Wamp server (Windows),


I have added new virtual hosts in "C:\WINDOWS\system32\drivers\etc\hosts" :


127.0.0.1 localhost
127.0.0.1 bitrix

I created a new folder "C:\wamp\bitrix" to serve my second project's files. And than add this code in httpd.conf:


    NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot 'C:\wamp\www'
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName bitrix
DocumentRoot 'C:\wamp\bitrix'
</VirtualHost>

but when i'm trying to access http://localhost or http://bitrix i'm getting "403 Forbidden" error.


If someone knows where is my mistake please help me :)




Can't you just put them both under a different folder of the htdocs directory?


MAMP -> htdocs



I'm trying to host multiple sites on my Wamp server (Windows),


I have added new virtual hosts in "C:\WINDOWS\system32\drivers\etc\hosts" :


127.0.0.1 localhost
127.0.0.1 bitrix

I created a new folder "C:\wamp\bitrix" to serve my second project's files. And than add this code in httpd.conf:


    NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot 'C:\wamp\www'
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName bitrix
DocumentRoot 'C:\wamp\bitrix'
</VirtualHost>

but when i'm trying to access http://localhost or http://bitrix i'm getting "403 Forbidden" error.


If someone knows where is my mistake please help me :)



Can't you just put them both under a different folder of the htdocs directory?


MAMP -> htdocs


0 commentaires:

Enregistrer un commentaire