Ruby on Rails中的乘客错误

时间:2015-11-21 13:32:53

标签: ruby-on-rails ruby apache passenger

这是我从虚拟主机文件中禁用重写模式时出现的错误:

  

Phusion Passenger应用程序服务器在启动Web应用程序时遇到错误由于您是在分段或生产模式下运行此Web应用程序,出于安全原因,此网页中已忽略错误的详细信息。

如果我不禁用重写模式,那么它会从我的项目目录外面提供500个内部页面错误。

配置文件( etc / apache2 / sites-avaliable / ):

 <VirtualHost *:80>

   ServerAdmin support@parking.com
   <IfModule mod_passenger.c>
     PassengerRoot /usr/local/rvm/gems/ruby-2.2.1@parking/gems/passenger-5.0.21
     PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.2.1@parking/wrappers/ruby
   </IfModule>

  ServerName parking.com
  ServerAlias www.parking.com
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^parking.com$ [NC]
  RewriteRule ^(.*)$ http://parking.com$1 [R=301,L]

  AddOutputFilterByType DEFLATE application/x-javascript text/javascript text/html text/plain text/xml text/css

  ErrorLog /var/log/apache2/parking-httpd-error.log
  CustomLog /var/log/apache2/parking-httpd-access.log combined

  PassengerBaseURI /
  PassengerMinInstances 1
  RailsEnv production
  SetEnv RAILS_ENV "production"


  DocumentRoot /var/www/sites/parking.com/public
  <Directory /var/www/sites/parking.com/public >
   # Options  +FollowSymLinks
    AllowOverride all
    Options -MultiViews
    Require all granted
 </Directory>
</VirtualHost>

当我查看我的日志文件时,我发现:

  

[Sat Nov 21 02:43:55.498467 2015] [autoindex:error] [pid 15994:tid 140692189869824] [client 127.0.0.1:46139] AH01276:无法提供目录/var/www/sites/parking.com/ :找不到匹配的DirectoryIndex(index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm),以及Options指令禁止的服务器生成的目录索引

0 个答案:

没有答案