主页 > 网络编程 > phpstudy虚拟域名配置

phpstudy虚拟域名配置

这篇文章介绍的内容是关于phpstudy虚拟域名配置,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下

 

第一步:在 C:WindowsSystem32driversetc下的hosts文件中添加

 

phpstudy虚拟域名配置

 

第二步:找到Apache 下的httpd.conf  文件 打开,去掉前边的#

 

 

 

 

phpstudy虚拟域名配置

 

 

phpstudy虚拟域名配置

 

 

第三步: 在vhosts.conf 文件中,配置以下内容

 

<VirtualHost *:80>

ServerAdmin auth.com
DocumentRoot "D:/phpStudy/WWW/Auth"
ServerName auth.com
ErrorLog "logs/auth.com-error.log"
CustomLog "logs/auth.com-access.log" common

</VirtualHost>

需要注意的: 散装软件中,是默认在httpd-vhosts.conf  这个文件中的,phpstudy 这个软件是在Apache中的vhosts.conf 中,不好搞错了!

 

 

 

配置虚拟域名  不能以.dev结尾  要以.com结尾    谷歌浏览器会默认强制转到https

说点什么吧
  • 全部评论(0
    还没有评论,快来抢沙发吧!