項目文件不在apache根目錄下怎麼可以訪問到呢?

我們需要手動的配置目錄權限。

默認情況下 有兩個配置在起作用:

一個是apache下的http.conf,在httpd.conf中

<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all       //修改這裏爲Allow from all
</Directory>

另外一個在配置虛擬主機的配置文件中httpd.vhosts.conf

<VirtualHost *:80>
ServerName www.******.com
DocumentRoot “這裏改成你項目的目錄路徑”
<Directory “這裏改成你項目的目錄路徑”>
Allow from All
#是否顯示目錄列表
Options Indexes
#是否啓用rewrite
Allowoverride all
</Directory>
</VirtualHost>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章