Why does the rails app show / public index list instead of the real app?

How to configure apache to show rails application when it is on the server? The rails application works fine on the local host, but when I go to an external site, it gives me index information

like this

Name    Last modified   Size    Description
[TXT]   404.html    21-May-2012 21:38   728      
[TXT]   422.html    21-May-2012 21:38   711      
[TXT]   500.html    21-May-2012 21:38   643      
[IMG]   favicon.ico 21-May-2012 21:38   0    
[TXT]   robots.txt  21-May-2012 21:38   204      

This is my virtual host info.

<VirtualHost *:80>
      ServerAdmin example@example.com
      ServerName server.example.com
      # ServerAlias
      DocumentRoot /var/www/sample_app/current/public
      ErrorLog /var/www/sample_app/error.log

          RailsEnv production
        <Directory "/var/www/sample_app/current/public">
          Options Indexes FollowSymLinks MultiViews
          Order allow,deny
          Allow from all
        </Directory>
</VirtualHost>
+3
source share
1 answer

OK, this may not be the case, but here's what Passenger Documentation recommends:

<VirtualHost *:80>
    ServerName www.mycook.com
    DocumentRoot /webapps/mycook/public
    <Directory /webapps/mycook/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

It clearly states that MultiViews is not compatible with Passenger.

So you can try:

  • Deleting an Index Option
  • Assignment -MultiViewsinsteadMultiViews

, , , , , ... " ", .

UPDATE , PassengerResolveSymlinksInDocumentRoot:

<VirtualHost *:80>
    ServerName www.mycook.com
    DocumentRoot /webapps/mycook/public
    <Directory /webapps/mycook/public>
        Allow from all
        Options -MultiViews
        PassengerResolveSymlinksInDocumentRoot on
    </Directory>
</VirtualHost>
+7

All Articles