Last active
August 29, 2015 14:10
-
-
Save ccwq/e302cc0198f77c542f12 to your computer and use it in GitHub Desktop.
Apache或者xmapp配置域名并跳转到特定目录
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache或者xmapp配置域名并跳转到特定目录 | |
1.在/conf/extra/httpd-vhosts.conf中(或者直接写到httpd.conf)增加 | |
<VirtualHost *:80> | |
DocumentRoot "E:/http/sanyou_cc" | |
ServerName "sanyou.cc" | |
</VirtualHost> | |
可以参考42行之前的举例,这里需要注意的是,apache的配置,不能用tab,不然会报错 | |
如果端口好不为80可以在httpd.conf中增加 | |
Listen 80 | |
Listen 88 | |
2.在httpd.conf中搜索Director修改其内容 | |
<Directory /> | |
#AllowOverride none | |
#Require all denied | |
Order deny,allow | |
Deny from allow | |
</Directory> | |
此项是为了防止出现错误:xampp Apache Access forbidden! Error 403 | |
3.修改host文件。增加 | |
127.0.0.1 sanyou.cc | |
4.重启或者开启apache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php不支持中文目录(虚拟目录或者virtualhost) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment