【发布时间】:2014-06-18 20:23:59
【问题描述】:
我正在运行 apache。我有一个名为 mis.chaatz.com 的虚拟主机。但是,如果我输入 mis.abc.com。它返回“禁止您无权访问/在此服务器上”。但是,如果我输入 mis.abc.com/login,它可以重新打开网页。我想我的 apache 配置有问题。试一整天,没有运气。
配置如下:
我在 /windows/system32/drivers/etc 中有一个主机文件
127.0.0.1 mis.abc.com
httpd.conf如下:
<Directory />
AllowOverride All
Require all granted
Allow from all
</Directory>
DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
# the following the document root of the mis.chaatz.com
<Directory "C:\apache24\htdocs\new_project\laravel\public\laravel1\public">
AllowOverride all
Require all granted
Allow from all
</Directory>
而httpd-vhosts的配置如下:
<VirtualHost *:80>
DocumentRoot "C:\apache24\htdocs\new_project\laravel\public\laravel1\public"
ServerName mis.abc.com
</VirtualHost>
【问题讨论】: