WampServer 主机文件未退出 [英] WampServer Hosts file not exit

查看:32
本文介绍了WampServer 主机文件未退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 wamp 服务器在我安装后出现问题.但是,我的 wamp 服务器仍然正常,但我可以知道如何更正此错误吗?

错误如下:

<块引用>

文件:C:/WINDOWS/system32/drivers/etc/hosts 不可写

文件 C:/WINDOWS/system32/drivers/etc/hosts 不存在

我可以知道如何更正吗?

解决方案

检查这个 C:/WINDOWS/system32/drivers/etc 路径,你的主机文件可能丢失了.只需按照以下步骤解决问题.

  1. 在桌面上创建新的文本文件并将其重命名为hosts".不要添加扩展.
  2. 使用任何文本编辑器打开它,粘贴以下代码并保存.

<前># 版权所有 (c) 1993-2006 Microsoft Corp.## 这是 Microsoft TCP/IP for Windows 使用的示例 HOSTS 文件.## 该文件包含 IP 地址到主机名的映射.每个# 条目应保留在单独的行上.IP地址应该# 放在第一列,后跟相应的主机名.# IP地址和主机名至少要隔一# 空间.## 此外,评论(例如这些)可能会被插入到个人# 行或跟在由#"符号表示的机器名称之后.## 例如:## 102.54.94.97 rhino.acme.com # 源服务器# 38.25.63.10 x.acme.com # x 客户端主机# localhost 名称解析是在 DNS 本身内处理的.# 127.0.0.1 本地主机# ::1 本地主机

  1. 现在将文件移动到 C:/WINDOWS/system32/drivers/etc 文件夹.
  2. 退出 WAMP 如果它正在运行并重新启动它.错误将消失.

有关更多详细信息,请在此处查看 Microsoft 支持文章:https://support.microsoft.com/en-us/help/972034/how-to-reset-the-hosts-file-back-to-the-default

There is a problem with my wamp server after i install it. However, my wamp server still as normal but may i know how to correct this errors?

errors as below:

The file: C:/WINDOWS/system32/drivers/etc/hosts is not writable

The file C:/WINDOWS/system32/drivers/etc/hosts does not exists

May i know how to correct it ?

解决方案

Check this C:/WINDOWS/system32/drivers/etc path, your hosts file is probably missing. Just follow these steps to fix the problem.

  1. Create new text file on desktop and rename it to "hosts". Don't add extension.
  2. Open it with any text editor, paste the following code and save it.


    # Copyright (c) 1993-2006 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 handle within DNS itself.
    #       127.0.0.1       localhost
    #       ::1             localhost 

  1. Now move the file to C:/WINDOWS/system32/drivers/etc folder.
  2. Exit WAMP if its running and start it again. The error will be gone.

for more detail checkout Microsoft support article here: https://support.microsoft.com/en-us/help/972034/how-to-reset-the-hosts-file-back-to-the-default

这篇关于WampServer 主机文件未退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆