1、打开LoadModule rewrite_module modules/mod_rewrite.so
2、打开
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
3、在httpd-vhosts.conf中配置虚拟访问路径
<VirtualHost *:80>
DocumentRoot "D:\wamp\www\zfProject"
ServerName nation.demo
SetEnv APPLICATION_ENV "development"
<Directory D:\wamp\www\zfProject>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot D:\wamp\www
ServerName localhost
</VirtualHost>
本文介绍如何通过修改Apache配置文件来设置虚拟主机,包括启用模块、配置虚拟主机文件及具体设置步骤。
1616

被折叠的 条评论
为什么被折叠?



