开发者

Virtual host with Passenger

Rails app already works correctly on mydomain.com with Apache+Passenger. In addition, I'm going to deploy non-Rails app(wordpress) on blog.mydomain.com. So I modified httpd.conf like

PassengerEnabled off
<VirtualHost *:80>
  ServerName mydomain.com
  DocumentRoot /var/www/railsapp/public
  PassengerEnabled on
</VirtualHost>

<VirtualHost *:80>
  ServerName blog.mydomain开发者_运维百科.com
  DocumentRoot /var/www/blog
</VirtualHost>

But this doesn't work. blog.mydomain.com also shows Rails app. How can I divide them?


Try adding this to the top of the conf file:

NameVirtualHost *:80

You might also try swapping the order so the more specific one is first, but look at the section called 'Using the ServerPath Directive' on this page. It indicates that with older http/1.0 clients, you may not have enough information to route it correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜