简体   繁体   English

流浪汉+木偶+ Apache:403错误

[英]Vagrant + Puppet + Apache : 403 error

I have a problem with Apache, using Vagrant and Puppet. 我对使用Vagrant和Puppet的Apache有问题。

With Vagrant, I mount my app folder like this : 使用Vagrant,我可以这样安装我的应用程序文件夹:

config.vm.synced_folder "./../", "/home/vagrant/myapp/", id: "myapp-sources", :owner => "root", :group => "root"

With I provision my vhost with puppet. 随着我给我的虚拟主机配偶。 It looks like this : 看起来像这样:

<VirtualHost *:80>
    ServerAdmin webmaster@myapp
    DocumentRoot /home/vagrant/myapp/web
    DirectoryIndex index.php index.html index.htm
    ServerName myapp.vagrant
    ServerAlias myapp.vagrant *.myapp.vagrant

    ErrorLog  /var/log/apache2/myapp-error_log
    CustomLog /var/log/apache2/myapp-access_log common

<Directory /home/vagrant/myapp/web>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>

When I access myapp.vagrant from my browser (I modified my /etc/hosts) I get a 403 error. 当我从浏览器访问myapp.vagrant时(我修改了/ etc / hosts),出现403错误。 In /var/log/apache2/myapp-error_log, I read this : 在/ var / log / apache2 / myapp-error_log中,我读到了以下内容:

[Tue Dec 31 10:33:00.841882 2013] [authz_core:error] [pid 998] [client 192.168.33.1:55878] AH01630: client denied by server configuration: /home/vagrant/myapp/web/

I have no .htaccess file in my web folder. 我的网络文件夹中没有.htaccess文件。

I don't know where to look to solve this. 我不知道该去哪里解决。

By the way, accessing my VM via it's IP in my browser shows the Apache "It works !" 顺便说一句,在浏览器中通过IP访问我的VM时,显示Apache“有效!”。 page in /var/www (user root, group root) and I have a virtual host to redirect myapp.vagrant:8000 to /usr/share/phpmyadmin (user root, group root) and it works fine. / var / www(用户根目录,组根目录)中的页面,我有一个虚拟主机将myapp.vagrant:8000重定向到/ usr / share / phpmyadmin(用户根目录,组根目录),并且运行良好。

Are you by any chance using Apache 2.4? 您是否有机会使用Apache 2.4? A simple search revealed it is likely a new permission model that's causing grief: http://dabase.com/blog/AH01630:_client_denied_by_server_configuration/ 一个简单的搜索显示,很可能是新的权限模型引起了麻烦: http : //dabase.com/blog/AH01630 : _client_denied_by_server_configuration/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM