php如何设置虚拟域名

来自:互联网
时间:2020-11-02
阅读:

php设置虚拟域名的方法:

1、找到apache的配置文件httpd.conf

php如何设置虚拟域名

2、在D:\wamp\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf里面

php如何设置虚拟域名

3、重定向,不然访问其他的项目会出现403的错误

php如何设置虚拟域名

4、找到C:\Windows\System32\drivers\etc\hosts

php如何设置虚拟域名

5、最后一步别忘了重启apache服务器

这样你配置的虚拟域名能访问了,用“127.0.0.1”或者“localhost”都能访问其他的项目了!

返回顶部
顶部