Den*_*one 14 apache xampp macos virtualhost
当我尝试在我的MAC上运行我的XAMPP安装时,我一直收到Access Forbidden Error 403
我在外面运行项目/Applications/XAMPP/htdocs.它在我的/Users/my_user_name/Projects/目录中.
每次我尝试去我的虚拟主机时,都会收到403错误:禁止访问.
我编辑了我的httpd-vhosts.conf文件,并且我在httpd.conf中允许虚拟主机.
我还在httpd.conf中将用户和组设置为用户my_user_name和Group Admin
我甚至试过chmoding我的所有文件和目录777但我仍然禁止访问Access.
我还在新安全设置的httpd-xampp.conf文件中将Deny更改为Allow.
XAMPP提供的erro_log没有提到我在访问日志中看到的403错误 127.0.0.1 - - [21/Aug/2013:14:45:20 -0400] "GET / HTTP/1.1" 403 1034
我打开错误,我看到了[authz_core:error] [pid 52813] [client 127.0.0.1:57473] AH01630: client denied by server configuration:
不知道还有什么要检查或尝试.请帮助哈哈.
AvL*_*AvL 24
只是为了得到答案:您可以通过添加httpd-vhosts.conf中的Require all granted每个来允许访问VirtualHost:
# VirtualHost for my.site.com
<VirtualHost *:80>
ServerAdmin webmaster@site.com
DocumentRoot "/Users/me/www/my.site.com/"
ServerName my.site.com
<Directory "/Users/me/www/my.site.com">
ServerSignature Off
Options Indexes FollowSymLinks IncludesNoExec
AllowOverride All
#Order allow,deny <- You can remove this
#Allow from all <- and that
# Insert the following:
Require all granted
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
祝好运!
Kni*_*awk 15
我一直有这个403问题,找不到答案直到......
Curly(右和左)引用我的vhosts文件中的位置.
如果您在错误日志中看到类似"xe2\x80\x9c"的内容,那么这就是您的问题.
我在一个可靠的编辑器(我使用Dreamweaver)中打开了httpd-vhosts.conf文件,并注意到引号是卷曲的(左右引号).他们需要直接引用.我的Mac上的常规文本编辑器会自动更改我对这些卷曲的引用,我没注意到它.
希望这个答案会对某人有所帮助.
在我的情况下,问题出在httpd.conf for Windows中的用户定义 :
User daemon
Group daemon
Run Code Online (Sandbox Code Playgroud)
变成
User myusername
Run Code Online (Sandbox Code Playgroud)
它奏效了
对于linux:
User myusername
Group sudo
Run Code Online (Sandbox Code Playgroud)
对于OSX:
User myusername
Group admin
Run Code Online (Sandbox Code Playgroud)
您也可能需要设置文件夹权限
sudo chown -R yourusername /Applications/XAMPP/xamppfiles/htdocs
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28710 次 |
| 最近记录: |