2019-07-22 phpStudy配置虚拟主机
2019-07-23
发布者:李书
导读1.右击phpStudy -【打开配置文件】-【vhosts-conf】;2.在里面加入如下代码,并保存:NameVirtualHost *:80VirtualHost *:80 ServerNamewww.test.com//你想要显示的域名 DocumentRoot "d:/test/"//目标文件夹Directo
1.右击 phpStudy ->【打开配置文件】->【vhosts-conf】;
2.在里面加入如下代码,并保存:
NameVirtualHost *:80 <VirtualHost *:80> ServerName www.test.com//你想要显示的域名 documentRoot "d:/test/"//目标文件夹 <Directory "d:/test/"> //目标文件夹 Options FollowSymlinks IncludesNOEXEC Indexes DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml AllowOverride Options FileInfo Order Deny,Allow Allow from all </Directory> </VirtualHost>
3.右击 phpStudy ->【打开配置文件】->【httpd-conf】;
4.打开后 Ctrl+f 搜索vhosts 把该行前面的#号删掉,若已删除,请忽略该步骤。
5.请按照C:WindowsSystem32driversetc路径找到hosts文件并打开。
6.在里面加入配置的虚拟域名。
7.重启phpstudy即可。
注意:若无法对hosts文件进行修改,请右击hosts,选择属性,安全,把所有用户的权限都勾选即可修改。
phpstudy 下载地址:链接:https://share.weiyun.com/569s2FW 密码:yd5rjp
原文链接:https://www.cnblogs.com/zhangxu-fasu/p/11227930.html
如有疑问请与原作者联系
免责声明:本文章由会员“李书”发布如果文章侵权,请联系我们处理,本站仅提供信息存储空间服务如因作品内容、版权和其他问题请于本站联系
下一篇:Php教学视频-共300G