Windows 7 WAMP服务器您的项目URL无效&;请勿使用n';行不通
我在Windows 7上安装了最新的x64wamp服务器:Windows 7 WAMP服务器您的项目URL无效&;请勿使用n';行不通,windows-7,wampserver,Windows 7,Wampserver,我在Windows 7上安装了最新的x64wamp服务器:wampserver3.1.0_x64.exe 由于IIS的原因,我将其默认80端口更改为8080&现在一切正常。 我在这个路径中添加了一个简单的项目:C:\wamp64\www如下所示: C:\wamp64\www\php\u test\index.php 在将phptest添加到虚拟主机后,我确实重新启动了所有服务。 我的问题: 1.如何修复该无效链接? 2.如何使虚拟主机可行? 评论后编辑>以下是我的主机文件内容: # Copy
wampserver3.1.0_x64.exe
由于IIS的原因,我将其默认80端口更改为8080&现在一切正常。我在这个路径中添加了一个简单的项目:
C:\wamp64\www
如下所示:
C:\wamp64\www\php\u test\index.php
在将phptest
添加到虚拟主机后,我确实重新启动了所有服务。我的问题:
1.如何修复该无效链接?
2.如何使虚拟主机可行?
评论后编辑>以下是我的主机文件内容:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
#
#
您的HOSTS文件基本上是空的,因为
#
是一条注释
您必须像这样将每个VHOST的引用添加到主机文件中,以便浏览器可以找到您的开发域
主机文件
127.0.0.1 localhost
::1 localhost
127.0.0.1 phptest
::1 phptest
现在,您必须像这样从“作为管理员”启动的命令提示符重新启动DNS缓存,或者只是重新启动电脑
>net stop dnscache
当这项工作完成时,你要做什么
>net start dnscache
或者WAMPServers菜单上有一个菜单项
[Right Click] wampmanager-> Tools -> Restart DNS
您看到WAMPServer主页工具菜单上名为“添加虚拟主机”的链接了吗。遵循这一点,它将帮助您正确创建虚拟主机。您是否修改了主机文件以包含此新的“phptext”域名?主机文件中需要进行哪些更改?我们将向我们展示您的主机文件,可能有人会告诉您。请将其添加到您的问题中,不要将其作为评论发布。我编辑我的问题。
>net start dnscache
[Right Click] wampmanager-> Tools -> Restart DNS