apache的虛擬目錄配置
阿新 • • 發佈:2018-11-16
<IfModule dir_module>
DirectoryIndex index.html index.htm index.phpAlias /myblog "F:/myblog"
<Directory d:/myblog>
order allow,deny
Allow from all
</Directory>
</IfModule>
#配置虛擬目錄
DirectoryIndex index.html index.htm index.php //相當於配置歡迎頁
Alias /myblog "F:/myblog"
<Directory d:/myblog> //許可權設定
order allow,deny
Allow from all
</Directory>
如何新增虛擬目錄
1.新增虛擬目錄的節點
<IfModule dir_module>
DirectoryIndex index.html index.htm index.phpAlias /myblog "F:/myblog"
<Directory d:/myblog>
order allow,deny
Allow from all //在允許所有的
</Directory>
</IfModule>
2.修改server主目錄,將以下這句話註釋DocumentRoot "E:/Damaruanjian/amp/web/xampp/htdocs"