2010-01-31 79 views
1

我想窩在虛擬主機配置內部Location指令是這樣的:如何在虛擬主機配置中嵌套位置指令?

<VirtualHost *:80> 
    ServerName mysite.com 
    DocumentRoot /home/deployer/apps/mysite/current/public 
    ErrorLog /var/log/prod.log 
    <Location "/shop"> 
     DocumentRoot /home/deployer/apps/mysite_shop/current/public 
     ErrorLog /var/log/prod.log 
    </Location> 
</VirtualHost> 

我想要做的就是去mysite.com/shop,並將其指向另一個應用程序。這可能嗎?還有另外一種方法嗎?我得到一個錯誤,因爲顯然Location指令不接受DocumentRoot。

謝謝。

回答