轉載:http://blog.csdn.net/sinat_35861664/article/details/53557574windows
找到
# Virtual hosts 這句前面的#不用去
#Include conf/extra/httpd-vhosts.conf 去掉本行註釋 #
服務器
conf/extra/http-vhosts.conf
複製添加以下代碼
<VirtualHost _default_:80>
DocumentRoot "D:\WWW\xxxx" #項目所在文件目錄
ServerName ttfj_bj.com #設置本地訪問網址
</VirtualHost>
ide
C:\Windows\System32\drivers\etc\hosts
在最後添加以下
127.0.0.1 xxxx #設置本地訪問網址 (與上ServerName一致)
最後重啓Apache服務器
Apache提示You don't have permission to access / on this server問題解決
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory></span>
改成
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory></span> this