乘客403错误
Passenger 403 error
我正在尝试为我的 rails 应用程序安装 passenger,但我不知道问题出在哪里。
休耕文件:
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
执行 passenger 的用户和网络服务器无权访问
/home/vagrant/shitatta/public
我认为你应该做一些改变:
- 使用您的用户登录(无业游民)
- 创建目录/opt/web/
- 将您的项目复制到 /opt/web/shitatta
- 转到/opt/web
- 更改授权访问,例如:
chmod 755 shitatta/*
- 更改所有者:
chown -R vagrant:vagrant shitatta
- 使用新路径更改您的 apache conf
- 将您的用户添加到 www-data
adduser vagrant www-data
或任何其他将使用 Apache 的用户
如果在执行 运行 命令时权限被拒绝,请在每个命令前添加 sudo。在我看来,将您的网站存储在您的主文件夹中是错误的。
您应该阅读有关 rails 的内容:
- What permissions are needed for apache Passenger
我正在尝试为我的 rails 应用程序安装 passenger,但我不知道问题出在哪里。
休耕文件:
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
执行 passenger 的用户和网络服务器无权访问
/home/vagrant/shitatta/public
我认为你应该做一些改变:
- 使用您的用户登录(无业游民)
- 创建目录/opt/web/
- 将您的项目复制到 /opt/web/shitatta
- 转到/opt/web
- 更改授权访问,例如:
chmod 755 shitatta/*
- 更改所有者:
chown -R vagrant:vagrant shitatta
- 使用新路径更改您的 apache conf
- 将您的用户添加到 www-data
adduser vagrant www-data
或任何其他将使用 Apache 的用户
如果在执行 运行 命令时权限被拒绝,请在每个命令前添加 sudo。在我看来,将您的网站存储在您的主文件夹中是错误的。
您应该阅读有关 rails 的内容:
- What permissions are needed for apache Passenger