Passenger和ServerAlias不合作

我有一个运行在具有多个IP地址和多个虚拟主机的服务器上的ruby应用程序。 这是有问题的虚拟主机的configuration:

<VirtualHost 10.0.0.10:80> ServerName realname.example.com ServerAlias alias.example.com DocumentRoot /var/www/sites/example/current/public <Directory /var/www/sites/example/current/public> AllowOverride all Options -MultiViews </Directory> ErrorLog /var/log/httpd/example_error_log CustomLog /var/log/httpd/example_access_log common RailsEnv production RackEnv production </VirtualHost> 

当我拉起realname.example.com Ruby on Rails应用程序正常工作。

另一方面, alias.example.com只是给我Not Found: /

我相当确定正确的虚拟主机正在使用,因为alias.example.com在正确的日志文件中产生一个404。

我已经尝试将日志logging添加到Passengerconfiguration,它似乎表明Passenger正在获取请求。

注意:我无法将alias.example.comredirect到realname.example.com。 realname是使用CDN访问的,而别名是直接访问的。

任何人有任何想法,为什么这是行不通的? 我一直在b my我的头几天,而且我也有类似的QAconfiguration,按预期工作。

原来问题是这个Apache指令:

UseCanonicalName On