Directory index forbidden by Options directive in ruby on rails

1.3k views Asked by At

I Configured SSL for rails app running with thin server in CentOS linux environment with apache. 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

 Directory index forbidden by Options directive.

I made some changes in /etc/httpd/conf.d/welcome.conf as

"Options -Indexes" TO "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

1

There are 1 answers

0
wireghoul On

Your included Apache configuration shows the HTTP virtual host as it's litening on port 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.