乘客,403禁止

时间:2014-07-15 13:33:56

标签: ruby-on-rails apache passenger

我正在尝试为我的rails应用程序安装乘客,但我不知道问题出在哪里。我已经尝试在我的app文件夹中执行chmod 775,没有任何作用。暂停文件:

网站 - 可用并启用  “meuapp.conf”

<VirtualHost *:80>
ServerName meuapp,localhost  
ServerAlias meuapp.localhost
ServerAdmin webmaster@localhost

DocumentRoot "/home/pedro/projects/meuapp/public"
<Directory "/home/pedro/projects/meuapp/public">
    Options FollowSymLinks
    AllowOverride None
</Directory>

RailsEnv development

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

“主机”

127.0.0.1 localhost
127.0.0.1 meuapp,localhost
127.0.1.1 pedro-pcl

“apache2.conf”

LoadModule passenger_module /home/pedro/.rvm/gems/ruby-1.9.3-p194/gems/passenger-4.0.45/buildout/apache2/mod_passenger.so
   <IfModule mod_passenger.c>
     PassengerRoot /home/pedro/.rvm/gems/ruby-1.9.3-p194/gems/passenger-4.0.45
     PassengerDefaultRuby /home/pedro/.rvm/gems/ruby-1.9.3-p194/wrappers/ruby
   </IfModule>

我的日志:

[ 2014-07-15 19:26:32.8459 1368/7ff21372a780 agents/HelperAgent/Main.cpp:649 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.1358/generation-0/request
    [ 2014-07-15 19:26:32.8519 1374/7f6b9f6ac780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.1358/generation-0/logging
    [ 2014-07-15 19:26:32.8522 1359/7f5ef2f45780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
    [Tue Jul 15 19:26:32.870422 2014] [so:warn] [pid 1358] AH01574: module passenger_module is already loaded, skipping
    [ 2014-07-15 19:26:32.8745 1387/7f657ffb6780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_ruby' => '/home/pedro/.rvm/gems/ruby-1.9.3-p194/wrappers/ruby', 'default_user' => 'nobody', 'log_level' => '0', 'max_pool_size' => '6', 'passenger_root' => '/home/pedro/.rvm/gems/ruby-1.9.3-p194/gems/passenger-4.0.45', 'passenger_version' => '4.0.45', 'pool_idle_time' => '300', 'temp_dir' => '/tmp', 'union_station_gateway_address' => 'gateway.unionstationapp.com', 'union_station_gateway_port' => '443', 'user_switching' => 'true', 'web_server_passenger_version' => '4.0.37', 'web_server_pid' => '1385', 'web_server_type' => 'apache', 'web_server_worker_gid' => '33', 'web_server_worker_uid' => '33' }
    [ 2014-07-15 19:26:32.8787 1391/7f21df2fe780 agents/HelperAgent/Main.cpp:649 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.1385/generation-0/request
    [ 2014-07-15 19:26:32.8858 1397/7fa1e768c780 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.1385/generation-0/logging
    [ 2014-07-15 19:26:32.8861 1387/7f657ffb6780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
    [Tue Jul 15 19:26:33.387955 2014] [mpm_prefork:notice] [pid 1385] AH00163: Apache/2.4.7 (Ubuntu) Phusion_Passenger/4.0.37 PHP/5.5.9-1ubuntu4.3 configured -- resuming normal operations
    [Tue Jul 15 19:26:33.388003 2014] [core:notice] [pid 1385] AH00094: Command line: '/usr/sbin/apache2'

我尝试了“需要所有授予”的事情,仍在努力工作

1 个答案:

答案 0 :(得分:3)

您可能遇到与描述其403 Error with Passenger的StackOverflow用户相同的问题。

建议,在检查错误日志(您配置它的方式,可能在/var/log/apache2/error.log中)并确认您看到client denied by server configuration问题后,将添加{{1在虚拟主机文件中的Require all granted块内。所以,你的块看起来像这样:

<Directory>