0

Rails アプリは、既にmydomain.comで Apache+Passenger を使用して正しく動作しています。さらに、非 Rails アプリ (wordpress) をblog.mydomain.comにデプロイします。だから私は httpd.conf を次のように変更しました

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>

しかし、これはうまくいきません。blog.mydomain.comにも Rails アプリが表示されます。どうすれば分割できますか?

4

1 に答える 1

1

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.

于 2011-01-07T06:40:12.340 に答える