2012-06-15 23 views
0

我有網絡服務器使用默認的虛擬主機的Apache如何在另一個php應用程序的相同域中設置rails應用程序?

<VirtualHost *:80> 
    ServerAdmin [email protected] 

    DocumentRoot /var/www 

    <Directory /> 
      Options FollowSymLinks 
      AllowOverride all 
    </Directory> 
    <Directory /var/www/> 
      Options Indexes FollowSymLinks MultiViews 
      AllowOverride all 
      Order allow,deny 
      allow from all 
    </Directory> 
</VirtualHost> 

我的PHP應用程序運行良好的子文件夾和我可以訪問像下面

domain.com/phpapp1

domain.com/phpapp2

domain.com/phpapp3

但是我如何運行一個使用乘客的rails應用程序,比如domain.com/railsapp1?我想用同一域中所有的應用程序

回答

1

我不知道這是否是最好的方式,但我得到它的工作添加以下行對同一域名配置,例如管理平臺和主要的應用程序

<VirtualHost *:80> 
ServerAdmin [email protected] 

DocumentRoot /var/www 

<Directory /> 
     Options FollowSymLinks 
     AllowOverride all 
</Directory> 
<Directory /var/www/> 
     Options Indexes FollowSymLinks MultiViews 
     AllowOverride all 
     Order allow,deny 
     allow from all 
</Directory> 

<Directory /var/www/redmine> 
     RailsBaseURI /redmine 
     PassengerResolveSymlinksInDocumentRoot on 
     PassengerAppRoot /var/www/redmine 
</Directory> 

</VirtualHost> 
相關問題