我有使用甲基苯丙胺我的OS X的機器上運行的本地服務器環境,和我目前設置了一些虛擬主機。我發現,爲了讓我的一個虛擬主機識別我的網站的.htaccess
文件,我需要在<VirtualHost>
指令中添加<Directory>
指令。阿帕奇:<Directory>指令沒有指定路徑
這裏是我使用的配置我的虛擬主機一個什麼樣的一個例子:
<VirtualHost *>
DocumentRoot "/path/to/mysite"
ServerName mysite.local
<Directory "/path/to/mysite">
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
現在,我想通過從<Directory>
指令取出路徑,以避免冗餘。我試圖這樣做,它似乎工作,雖然我不熟悉Apache足以知道這樣做的潛在後果。此外,我無法在Apache文檔中找到這種情況的解釋。
這是我會像向做:
<VirtualHost *>
DocumentRoot "/path/to/mysite"
ServerName mysite.local
<Directory>
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
因此,我的問題是這樣的:當我忽略從<Directory>
指令的路徑出現(在這種情況下)是什麼?