2013-09-26 41 views
0

运行R.o.R.乘客站点。乘客运行良好,但我不知道如果我设置我的vHosts或什么的方式有问题,但它是返回一个Apache开始页面,而不是我的应用程序。试图让我的ROR网站启动并运行...得到404

当我运行

passenger-status 

这里的消息:

Version : 4.0.18 
Date : 2013-09-26 10:42:03 -0400 
Instance: 20958 
----------- General information ----------- 
Max pool size : 6 
Processes  : 0 
Requests in top-level queue : 0 

----------- Application groups ----------- 
[[email protected] relaunchradio]# 

这里是我的httpd.conf乘客的东西:

LoadModule passenger_module /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger- 4.0.18/buildout/apache2/mod_passenger.so 
PassengerRoot /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18 
PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.0.0-p247/ruby 
PassengerDefaultUser root 

没问题,我看到有,这里是我的站点主目录中的vhost.conf文件:

ServerName gregorymurray.com 
ServerAlias gregorymurray.com 
DocumentRoot /var/www/vhosts/gregorymurray.com/relaunchradio/public 
PassengerAppRoot /var/www/vhosts/gregorymurray.com/relaunchradio 

<Directory "/var/www/vhosts/gregorymurray.com/relaunchradio/public"> 
Options FollowSymLinks 
AllowOverride None 
Order allow,deny 
Allow from all 
</Directory> 

RailsEnv production 
RailsBaseURI/

这里有两个链接我也跟着在得到这个运行过程:

http://www.twohard.com/blog/setting-rails-passenger-mediatemple-dv35-servers

https://coderwall.com/p/lu3nfa

回答

0

确定Apache2的是找到vhost.conf文件?您是否使用某种共享主机,需要将该文件放置在您网站的主目录中?因为,那不是正常的设置。根据使用Ubuntu还是centOS,虚拟主机文件属于/ etc/apache2或/ etc/httpd。看看你的apache conf文件,找出它在哪里寻找虚拟主机。

打开/etc/httpd/conf/httpd.conf并查找vhost.conf。或者查找您的gregorymurray.com的完整路径的包含指令。我怀疑是否有人会被发现。这意味着你需要将vhost.conf移动到/etc/httpd/conf/sites-enabled/vhost.conf并在你的httpd.conf中添加Include sites-enabled /在乘客模块东西的上方。

将您的vhost.conf放在您的网站目录中将需要您更改您的httpd.conf以在该网站目录中查找虚拟主机conf文件。这不是默认设置或常规设置。

+0

是的,我在CentOS上使用VPS。 apache conf文件位于/etc/httpd/conf/httpd.conf,而vhost.conf文件位于站点目录中:/var/www/vhosts/gregorymurray.com这是我个人服务器上的工作原理通过Media Temple,但我试图通过MT在我的客户端服务器上进行设置,并且我遇到了所有这些问题...... –

+0

打开/etc/httpd/conf/httpd.conf并查找vhost.conf。或者查找您的gregorymurray.com的包含指令。我怀疑是否有人会被发现。这意味着你需要将vhost.conf移动到/etc/httpd/conf/sites-enabled/vhost.conf并在你的httpd.conf中添加Include sites-enabled /在乘客模块东西的上方。 – nathanengineer

相关问题