Apache在本地主机上的行为不同

我已经设法在CentOS 5.5的VPS机器上安装Apache2,Passenger和Ruby on Rails。 检查一切正常,我运行在该机器的links http://localhost ,并显示正确的页面。 该应用程序存储在/var/www/webapp

但是,如果我试图从外面访问此页面。 例如: http://212.227.XYZ.ZZ ,我得到位于/var/www/vhosts/default/htdocs/index.html的Apache欢迎页面。

这是我的/etc/httpd/config/httpd.conf一部分:

 DocumentRoot "/var/www/" LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/ext/apache2/mod_passenger.so PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.2 PassengerRuby /usr/local/bin/ruby <VirtualHost *:80> ServerName 212.227.XYZ.ZZ DocumentRoot /var/www/webapp/public <Directory /var/www/webapp/public> AllowOverride all Options MultiViews </Directory> </VirtualHost> 

我不知道为什么如果我从外面查询服务器,然后我得到不同的网页。 我在/etc/httpd/conf/查找了configuration文件,但是我还没有find任何其他的configuration文件,但httpd.conf

我也试过把这个webapp放在/var/www/vhosts/default/htdocs/ ,但是我得到这个错误:“Rails应用程序无法正常启动”。

我怎么解决这个问题? 这让我疯狂。

非常感谢。

解决了。 我发现其他configuration文件覆盖此行为。 它们位于/etc/httpd/conf.d/