比较实用的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

相关文章
相关标签/搜索