小兔网

phpstudy域名无法访问-phpstudy

1、第一要确保window有hosts文件,同时hosts文件是没有任何后缀的

2、hosts中有 (127.0.0.1 你的虚拟域名) 语句

例子:127.0.0.1 www.mmp.com

3、phpstudy中Apache中httpd.conf中如下语句前#要有

#Include conf/extra/httpd-vhosts.conf

此外请确保httpd.conf正常,没有被乱修改过

4、确保phpStudy\Apache\conf\vhosts.conf 中已经配置好你的虚拟域名可以参考如下配置,

下面例子是配置的网站是www.mmp.com,DocumentRoot后填写你的虚拟域名要访问的那个文件的路径

<VirtualHost *:80>    DocumentRoot "D:/phpStudy/WWW/xdswxhd"    ServerName www.mmp.com    ServerAlias phpStudy.net  <Directory "D:/phpStudy/WWW/xdswxhd">      Options  +Indexes +FollowSymLinks +ExecCGI      AllowOverride All      Order allow,deny      Allow from all      Require all granted  </Directory></VirtualHost>

推荐教程:phpstudy教程

以上就是phpstudy域名无法访问的知识。速戳>>知识兔学习精品课!