简体   繁体   English

Rails / Apache / Passenger部署问题…仅查看文件索引

[英]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. 我有一个Rails应用程序(jetway),可以在使用WEBrick服务器的SQLlite开发中正常工作。 I installed apache2 and mysql2 for production. 我安装了apache2和mysql2进行生产。 When I start apache I can see the index page without issue. 当我启动apache时,我可以看到没有问题的索引页面。 MySql is also working fine, when I rake, the db gets set up and I can seed it without issue. MySql也运行良好,当我耙的时候,数据库被设置好了,我可以毫无问题地播种它。

Passenger has also been installed and when I restart apache the logs states 乘客也已安装,当我重新启动apache时,日志状态

[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 这是我的jetway apache配置文件

<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. 通过此设置,当我启动Apache时,确实收到有关没有虚拟主机的消息。

 * 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. 我在Rails应用程序中将环境设置为生产环境。 With this setup all I see when I go to /jetway is a list of the files in the jetway directory. 通过此设置,我进入/ jetway时看到的只是jetway目录中文件的列表。 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. 我将index.html放在我的公共文件中以查看会发生什么,如果转到公共目录,它将显示索引页面,而不是目录列表。 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/ 您可能还需要查看apache是​​否已对public /

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

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