Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php WAMP错误:找不到主机。Vhost设置_Php_Mysql_Apache_Wamp_Vhosts - Fatal编程技术网

Php WAMP错误:找不到主机。Vhost设置

Php WAMP错误:找不到主机。Vhost设置,php,mysql,apache,wamp,vhosts,Php,Mysql,Apache,Wamp,Vhosts,我已经在本地运行WAMP大约一年了,似乎没有任何原因,我正试图转到我的项目主页(使用我的vhost“cevans.local”,它引用了这个文件夹C:/WAMP/www/healthsnap/),并得到以下错误: 拨号tcp:lookup cevans.local:没有这样的主机 今天我在网上搜索了几个小时,试图解决这个问题。我没有接触任何与vhosts设置相关的内容: 主人 httpd.conf Listen 0.0.0.0:80 # Virtual hosts Include conf/

我已经在本地运行WAMP大约一年了,似乎没有任何原因,我正试图转到我的项目主页(使用我的vhost“cevans.local”,它引用了这个文件夹C:/WAMP/www/healthsnap/),并得到以下错误:

拨号tcp:lookup cevans.local:没有这样的主机

今天我在网上搜索了几个小时,试图解决这个问题。我没有接触任何与vhosts设置相关的内容:

主人

httpd.conf

Listen 0.0.0.0:80

# Virtual hosts
Include conf/extra/httpd-vhosts.conf
httpd-vhosts.conf

<VirtualHost *:80> 
    DocumentRoot "C:/wamp/www/healthsnap/" 
    ServerName cevans.local 
    ServerAlias cevans.local 
    <Directory "C:/wamp/www/healthsnap/"> 
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www"
    ServerName localhost
    ServerAlias localhost
    <Directory  "C:/wamp/www">
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>

DocumentRoot“C:/wamp/www/healthsnap/”
ServerName cevans.local
ServerAlias cevans.local
命令拒绝,允许
全盘否定
允许从127.0.0.1开始
DocumentRoot“C:/wamp/www”
服务器名本地主机
服务器别名本地主机
命令拒绝,允许
全盘否定
允许从127.0.0.1开始
我相信现在的情况是,我的vhosts设置有问题,vhost被用于我的项目的配置文件中,以引用数据库凭据。这些相同的凭据在phpMyAdmin和另一个MySQL客户端上运行良好


另外,我不是web开发人员。

我有一个活动的VPN连接,这导致了问题。当我关闭VPN连接时,它开始工作。

最近的操作系统(Windows 7)更新是否与此相关?请参阅此线程:-可能有助于同时在wamp和VPN上运行localhost
<VirtualHost *:80> 
    DocumentRoot "C:/wamp/www/healthsnap/" 
    ServerName cevans.local 
    ServerAlias cevans.local 
    <Directory "C:/wamp/www/healthsnap/"> 
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/wamp/www"
    ServerName localhost
    ServerAlias localhost
    <Directory  "C:/wamp/www">
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>