[英]Passenger doesn't seem to know the VirtualHost is a rails app
I've configured Apache 2.2 with a VirtualHost for a Ruby on Rails (2.3.14) application. 我为Ruby on Rails(2.3.14)应用程序配置了带有VirtualHost的Apache 2.2。
However, when I visit the url for the website I'm presented with a directory listing. 但是,当我访问网站的URL时,会看到目录列表。
I've checked that passenger (5.0.9) is loaded by Apache (it is) and I've got the loglevel set to 4 so I can see what passenger is doing. 我检查了Apache是否加载了乘客(5.0.9),并且将日志级别设置为4,以便可以看到乘客在做什么。 It starts up and indicates that it is listening for requests.
它启动并指示它正在侦听请求。
However, it would appear that passenger is not being invoked when the website is visited. 但是,当访问该网站时,似乎没有调用乘客。
How does passenger know that it needs to handle this virtualhost? 乘客如何知道需要处理此虚拟主机?
Thanks 谢谢
Solution: 解:
The rails application did not have a config.ru file. Rails应用程序没有config.ru文件。
After pinching one off the web for rails 2.3 the application now appears instead of the directory listing. 在将其中一个从Rails 2.3上拖下后,现在将显示该应用程序,而不是目录列表。
It appears from the passenger documentation this this file is used by rack to fire up instances of the application. 从乘客文档中可以看到,机架使用此文件来启动应用程序实例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.