2009-10-03 43 views
1

我在Passenger上運行Rails應用程序,它的一切都像它應該運行。如何使用Passenger爲Sinatra應用程序配置VirtualHost?

我想添加一個Sinatra應用程序作爲帶Passenger的機架應用程序來運行,但出現路由錯誤。

我VirtualHosts文件看起來像:

NameVirtualHost *:80 
<VirtualHost *:80> 
    ServerName www.domain1.com 
    DocumentRoot /home/user1/vhosts/project1/public 
    ErrorLog  /home/user1/vhosts/project1/log/httpd_error_log 
    CustomLog /home/user1/vhosts/project1/log/httpd_access_log combined 
</VirtualHost> 

<VirtualHost *:80> 
    ServerName www.sub.domain2.com 
    DocumentRoot /home/user2/vhosts/sinatra_app/lib/public 
    ErrorLog  /home/user2/vhosts/sinatra_app/lib/log/httpd_error_log 
    CustomLog /home/user2/vhosts/sinatra_app/lib/log/httpd_access_log combined 
</VirtualHost> 

我的末日應用程序是非常簡單的;我有一條名爲get "/do_something" do ....的路線,沒有公共文件。它只響應一些JSON。

我怎樣才能使它不喜歡www.sub.domain2.com/do_something

回答

0

看來OK請求,是在權限的設置是否正確?

+0

問題解決,我的設置是正確的,我升級到最新版本的乘客和所有作品應該:) 感謝您的幫助! – phx 2009-10-03 15:54:52

相關問題