标签:配置虚拟主机
配置虚拟主机
在apache的httpd.conf文件末添加如下代码:
<VirtualHost *:80>
ServerName 修改成自己的域名
DocumentRoot "修改成自己的项目路径"
<Directory "修改成自己的项目路径">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
示例:
<VirtualHost *:80>
ServerName www.ff.com
DocumentRoot "E:/wamp/www/demo"
<Directory "E:/wamp/www/demo">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
在系统文件C:\Windows\System32\drivers\etc\hosts中添加如下配置127.0.0.1 www.ff.com
本文出自 “素颜” 博客,请务必保留此出处http://suyanzhu.blog.51cto.com/8050189/1682636
标签:配置虚拟主机
原文地址:http://suyanzhu.blog.51cto.com/8050189/1682636