終于可以獨(dú)立在wampserver上建虛擬主機(jī)了

一。修改windows/system32/drivers/etc/hosts文件。

127.0.0.1? ? ? localhost

127.0.0.1? ? ? stick.eff.do

二。新建虛擬主機(jī)的目錄,在extra/httpd-vhosts.conf文件中。

<VirtualHost *:80>

ServerAdmin webmaster@dummy-host2.example.com

DocumentRoot "d:/wamp/www"

ServerName localhost

ErrorLog "logs/dummy-host2.example.com-error.log"

CustomLog "logs/dummy-host2.example.com-access.log" common

</VirtualHost>

三。在httpd.conf開啟虛擬主機(jī)的功能。

# Virtual hosts

Include conf/extra/httpd-vhosts.conf

四。以防出現(xiàn)403錯(cuò)誤,在httpd.conf加。

<Directory />

Options FollowSymLinks

AllowOverride None

Order allow,deny

allow from all

allow from 127.0.0.1

<Directory />

五。以防出現(xiàn)404錯(cuò)誤。

重新配置localhost的主機(jī)。

六。簡(jiǎn)書好膽小,不能復(fù)制大于號(hào)小于號(hào)。

七。為什么訪問(wèn)127.0.0.1出現(xiàn)404錯(cuò)誤。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容