简体   繁体   English

Rails应用程序部署问题

[英]Rails application deployment issue

I have a virtual private server (centos 5) with two IP addresses and one domain name associated with one of them. 我有一台虚拟专用服务器(centos 5),其中有两个IP地址和一个与其中之一关联的域名。 I am trying to deploy a rails application through Apache + Passenger. 我正在尝试通过Apache + Passenger部署Rails应用程序。 After usual installation and configuration I have this strange results: 1) if I browse and activate the controller actions using the secondary ip address everything works fine. 经过通常的安装和配置后,我得到以下奇怪的结果:1)如果我使用辅助ip地址浏览并激活控制器操作,则一切正常。 2) if I use the primary ip address or the domain name in the browser the result is "document not found" 2)如果我在浏览器中使用主IP地址或域名,则结果为“找不到文档”

Any possible hint/help? 任何可能的提示/帮助? Thanks Antonio 谢谢安东尼奥


Apache virtual host configuration: Apache虚拟主机配置:

VirtualHost *:80 虚拟主机*:80
ServerName www.mysitename.com ServerName www.mysitename.com
DocumentRoot /var/.../appname/public DocumentRoot /var/.../appname/public
Directory /var/......./appname/public 目录/var/......./appname/public
AllowOverride all 允许全部覆盖
Options -Multiviews 选项-多视图

there is no reference in the Apache httpd.conf file to the secondary ip address. 在Apache httpd.conf文件中没有对辅助IP地址的引用。

Thanks for the link to the useful documentation. 感谢您提供有用文档的链接。

Antonio 安东尼奥

What is the apache configuration for the application?. 该应用程序的apache配置是什么? The most possible reason for this behavior is the apache configuration is bound to the secondary ip address. 此行为的最可能原因是apache配置绑定到辅助IP地址。

Refer this for changing the ip settings of apache. 参考更改apache的ip设置。

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

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