WAMP本地环境搭建笔记

2015-12-14

开启虚拟主机

1.编辑文件 F:\wamp\bin\apache\apache2.4.9\conf\httpd.conf

去掉httpd-vhosts.conf的注释

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

把Directory修改成如下

<Directory />
    Order Deny,Allow
    Deny from all
	Allow from all
</Directory>

2.编辑文件 F:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

<VirtualHost *:80>
    DocumentRoot D:/00_cloud/server-php
    ServerName server-php.com
    <Directory "D:/00_cloud/server-php">
	    Options Indexes FollowSymLinks
	    AllowOverride None
	    Order allow,deny
	    Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot F:/wamp/www
    ServerName localhost
    <Directory "F:/wamp/www">
	    Options Indexes FollowSymLinks
	    AllowOverride None
	    Order allow,deny
	    Allow from all
    </Directory>
</VirtualHost>

3.修改 C:\Windows\System32\drivers\etc\hosts

添加

127.0.0.1 server-php.com