简体   繁体   English

在Ruby on Rails中,Options指令禁止目录索引

[英]Directory index forbidden by Options directive in ruby on rails

I Configured SSL for rails app running with thin server in CentOS linux environment with apache . 我为使用ApacheCentOS linux环境中与瘦服务器一起运行的rails应用程序配置了SSL When I try to open my site using "https" I am getting Apache error page and I checked apache error logs and got the following error message 当我尝试使用"https"打开站点时,出现Apache错误页面,并且检查了apache错误日志并收到以下错误消息

 Directory index forbidden by Options directive.

I made some changes in /etc/httpd/conf.d/welcome.conf as 我在/etc/httpd/conf.d/welcome.conf中做了一些更改,

"Options -Indexes" TO "Options +Indexes" "Options -Indexes" "Options +Indexes""Options +Indexes"

then I am getting directory structure in browser. 然后我在浏览器中获取目录结构。

Please help me to solve the issue 请帮我解决问题

Update: 更新:

<VirtualHost *:80>
  ServerName XXXX
  ServerAlias www.XXXX.com

  DocumentRoot XXXX

  RewriteEngine On

  <Proxy balancer://thinservers>
    BalancerMember http://127.0.0.1:3000

  </Proxy>
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L]

  ProxyPass / balancer://thinservers/
  ProxyPassReverse / balancer://thinservers/
  ProxyPreserveHost on

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  # Custom log file locations
  ErrorLog  XXXX
  CustomLog XXXX

Your included Apache configuration shows the HTTP virtual host as it's litening on port 80 <VirtualHost *:80> 随附的Apache配置显示了HTTP虚拟主机在端口80 <VirtualHost *:80>上亮起的状态。

HTTPS connects to a different virtual host defined on port 443 you will need to modify this virtualhost's configuration in order to change the way the HTTPS portion of your website behaves. HTTPS连接到在端口443上定义的其他虚拟主机,您将需要修改此虚拟主机的配置,以更改网站的HTTPS部分的行为。

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

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