简体   繁体   中英

Rails/Apache/Passenger deploy issues…Only seeing index of files

I know there are other questions that have similar issues, but I have read through all of them and am not getting any resolution.

I have a rails app(jetway) that works fine in development with SQLlite, using the WEBrick server. I installed apache2 and mysql2 for production. When I start apache I can see the index page without issue. MySql is also working fine, when I rake, the db gets set up and I can seed it without issue.

Passenger has also been installed and when I restart apache the logs states

[Fri Jun 22 09:07:53 2012] [notice] Apache/2.2.20 (Ubuntu) Phusion_Passenger/3.0.13 configured -- resuming normal operations

Here is my jetway apache config file

<VirtualHost :*80>
   ServerName jetway
   RailsEnv production
   DocumentRoot /home/jason/jetway/public
</VirtualHost>

With this setup, when I start Apache I do get an message about no virtual hosts.

 * Restarting web server apache2
[Fri Jun 22 09:17:56 2012] [error] (EAI 2)Name or service not known: Could not resolve host name :*80 -- ignoring!
[Fri Jun 22 09:17:56 2012] [warn] NameVirtualHost 99.44.242.76:80 has no VirtualHosts
[Fri Jun 22 09:17:56 2012] [warn] NameVirtualHost *:80 has no VirtualHosts

I have my environment set to production in my rails app. With this setup all I see when I go to /jetway is a list of the files in the jetway directory. I put an index.html in my public file to see what would happen and if I go to the public directory it shows the index page, not the directory listing. Any help would be greatly appreciated.

Try adding something like

<Directory /home/jason/jetway/public>
    Allow from all
    Options -MultiViews
</Directory>

and see if that helps.

You may also need to see that apache has read/execute writes to public/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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