Php 丢失了我的本地主机目录
以前,当我运行“http:/localhost/”时,我可以直接进入我的xampp主页 我按照教程创建虚拟主机并编辑主机文件 我的windows32主机文件如下所示Php 丢失了我的本地主机目录,php,apache,Php,Apache,以前,当我运行“http:/localhost/”时,我可以直接进入我的xampp主页 我按照教程创建虚拟主机并编辑主机文件 我的windows32主机文件如下所示 > 127.0.0.1 localhost > 127.0.0.1 my_test_server > # ::1 localhost 我的xammp httpd-vhosts.conf是用这些添加内容编辑的 > <VirtualHost
> 127.0.0.1 localhost
> 127.0.0.1 my_test_server
> # ::1 localhost
我的xammp httpd-vhosts.conf是用这些添加内容编辑的
> <VirtualHost *:80>
> DocumentRoot "C:/xampp/htdocs/my_test_server/public"
> ServerName my_test_server
> </VirtualHost>
>
>DocumentRoot“C:/xampp/htdocs/my\u test\u server/public”
>服务器名称我的测试服务器
>
现在,当我使用
但是当我浏览的时候
我无法返回xampp索引页。所以我不能创建mysql数据库
有什么帮助吗?您应该能够在xampp htdocs目录中创建另一个带有本地主机服务器名的
VirtualHost
条目
另外,如果您查看httpd vhosts.conf
文件中的示例,它会说:
第一个VirtualHost部分用于所有不需要的请求
在任何块中匹配##服务器名或##服务器别名
因此,您也可以将其作为第一个VirtualHost
(无服务器名称)编写
DocumentRoot“C:/xampp/htdocs/”
您应该能够在xampp htdocs目录中创建另一个带有本地主机服务器名称的VirtualHost
条目
另外,如果您查看httpd vhosts.conf
文件中的示例,它会说:
第一个VirtualHost部分用于所有不需要的请求
在任何块中匹配##服务器名或##服务器别名
因此,您也可以将其作为第一个VirtualHost
(无服务器名称)编写
DocumentRoot“C:/xampp/htdocs/”
my_test_server时会发生什么?我得到视频我的问题是localhost nolonger指向xammp索引页你应该能够在你的xampp htdocs中创建另一个带有localhost server名称的VirtualHost
条目。非常感谢Xander当你到my_test_server时会发生什么?我得到视频我的问题是什么localhost nolonger指向xammp索引页您应该能够在xampp htdocs中创建另一个带有本地主机服务器名称的VirtualHost
条目。非常感谢xander
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/"
</VirtualHost>