Phusion Messenger虚拟主机

时间:2015-05-13 13:40:02

标签: ruby apache passenger

我正在尝试使用phusion乘客运行ruby应用程序服务器。问题是该应用程序托管在托管其他网站的Apache服务器上。所以我试着实现虚拟主机。由于某种原因,我无法达到我的申请。 DNS会将查询重定向,但会将其重定向到服务器上托管的其他网站。 phusion乘客在端口3000上运行,virtualhost文件如下:

<VirtualHost *:3000>
ServerAdmin admin@something.com
ServerName something.com
ServerAlias www.something.com

# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /var/www/redmine/public/    
RailsEnv development 
IndexOptions SuppressHTMLPreamble
RewriteEngine On
RewriteOptions inherit

<Directory /var/www/redmine/public>
# This relaxes Apache security settings.

AllowOverride all
Order allow,deny  
#MultiViews must be turned off.
Options Indexes FollowSymLinks -MultiViews +ExecCGI 
# Uncomment this if you're on Apache >= 2.4:
Require all granted
</Directory>

1 个答案:

答案 0 :(得分:0)

原来有两个问题:

  1. <VirtualHost *:3000>应该是<VirtualHost *:80>
  2. <Directory /var/www/redmine/public>应该是<Directory /var/www/redmine/public/>。只有一个小斜线,在公开之后,它产生了不同。