Home  >  Q&A  >  body text

An error occurred when creating a virtual host using the site domain name, and the hosts file cannot be modified?

When I was watching the teaching video, after installing PHPstudy, I talked about binding the domain name I created to the IP of the local machine and modifying a hosts file, but the modification was always unsuccessful. Has anyone encountered the same problem?

冰淇淋冰淇淋2567 days ago1838

reply all(2)I'll reply

  • phpcn_u50289

    phpcn_u502892017-11-01 13:20:58

    Because the windows account you are using does not have administrator rights, you can directly go to the C drive>windws>system32>drivers folder to find the hosts file, right-click to open it with administrator rights, and modify and save

    That’s it

    reply
    0
  • 冰淇淋

    Thank you, very useful

    冰淇淋 · 2017-11-01 13:34:08
  • Day

    Day2017-11-01 10:26:09

    To configure the site domain name, you also need to open the Hsot file on the C drive. The format is as follows: 127.0.0.1 www.xxxxx.com. The default port is 80. If the virtual domain name port you configure is 81, you must enter it in the browser. The domain name is www.xxxxx.com:81 to access.

    reply
    0
  • Cancelreply