Windows環(huán)境下如何配置wamp的虛擬域名
2019-12-12 10:12:27
10246
修改服務(wù)域名,其主要就是修改關(guān)于apache的配置文件
1打開(kāi)apache的mod_rewrite功能
LoadModule rewrite_module modules/mod_rewrite.so//刪除前面的#
2引入http-vhosts文件
Include conf/extra/httpd-vhosts.conf//刪除前面的#
3進(jìn)入conf/extra文件夾找到http-hosts文件
NameVirtualHost*:80 //綁定80端口 listen 端口號(hào)//手動(dòng)設(shè)置監(jiān)聽(tīng)
<VirtualHost *:80>
ServerAdmin suibainxie@suibian.com
DocumentRoot "D:/Install/wamp/www/你的目錄"
ServerName www.你的域名.com
</VirtualHost>
4開(kāi)啟訪問(wèn)權(quán)限
返回配置文件
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
Require all granted
</Directory>
找到以上后,加載virhost的下面
修改
<Directory />的斜杠為你的文件夾絕對(duì)路徑
5修改windows的hosts文件指向即可。
會(huì)員登錄
賬號(hào)登錄還沒(méi)有賬號(hào)?立即注冊(cè)