我正在尝试为我的rails app安装乘客,但我不知道问题出在哪里。
暂停文件:
的httpd.conf
LoadModule passenger_module /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.53/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.53
PassengerDefaultRuby /usr/local/bin/ruby
</IfModule>
<VirtualHost *:80>
ServerName www.yourhost.com
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /home/vagrant/shitatta/public
<Directory /home/vagrant/shitatta/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
Require all granted
</Directory>
</VirtualHost>
error_log中:
[Sun Feb 22 09:49:20 2015] [error] [client 192.168.33.1] (13)Permission denied: access to / denied
[Sun Feb 22 09:49:20 2015] [error] [client 192.168.33.1] (13)Permission denied: access to /favicon.ico denied
答案 0 :(得分:0)
执行乘客和网络服务器的用户无权访问
/家庭/流浪/ shitatta /公共
我认为您应该做出一些改变:
chmod 755 shitatta/*
chown -R vagrant:vagrant shitatta
adduser vagrant www-data
或将使用Apache的任何其他用户如果在运行命令时拒绝了权限,请在每个命令之前添加sudo。在我看来,将您的网站存储在您的主文件夹中是一个错误。
你应该读一下rails: