比較實用的wamp配置多站點方法

1.保證httpd.conf下 php

LoadModule php5_module "D:/E/PHP/wamp/bin/php/php5.5.12/php5apache2_4.dll"
PHPIniDir D:/E/php/wamp/bin/php/php5.5.12
web

這兩個沒被註釋掉apache

2.打開多站點配置:ide

httpd.conf下面:Include conf/extra/httpd-vhosts.conf 去掉前面註釋ui

3.http-vhosts.conf配置(注意 Require all granted,不要寫成什麼allow from all什麼的。能夠參考httpd.conf中的寫法。)spa

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "D:/E/php/wamp/think"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
    <Directory "D:/E/php/wamp/think">
    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
    </Directory>
</VirtualHost>


<VirtualHost *:8080>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "D:/E/php/wamp/www"
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
    <Directory "D:/E/php/wamp/www">
    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
    </Directory>
</VirtualHost>
.net

4.host文件添加127.0.0.1 yourwwwget

相關文章
相關標籤/搜索