浅沫记忆 发表于 2021-10-1 10:16:28

Windows环境下如何配置wamp的虚拟域名

修改服务域名,其主要就是修改关于apache的配置文件
1打开apache的mod_rewrite功能

LoadModule rewrite_module modules/mod_rewrite.so//删除前面的#2引入http-vhosts文件

Include conf/extra/httpd-vhosts.conf//删除前面的#3进入conf/extra文件夹找到http-hosts文件

NameVirtualHost*:80//绑定80端口          listen 端口号//手动设置监听
<VirtualHost *:80>
ServerAdmin suibainxie@suibian.com
DocumentRoot "D:/Install/wamp/www/你的目录"
ServerName www.你的域名.com
</VirtualHost>4开启访问权限
返回配置文件

<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
Require all granted
</Directory>找到以上后,加载virhost的下面
修改
<Directory />的斜杠为你的文件夹绝对路径
5修改windows的hosts文件指向即可。
以上所述是小编给大家介绍的Windows环境下如何配置wamp的虚拟域名,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对CodeAE代码之家网站的支持!

https://www.uoften.com/serverhost/winhost/20180415/81183.html
页: [1]
查看完整版本: Windows环境下如何配置wamp的虚拟域名