本地是php的集成环境 phpstudy ,搭建了一个站点:
图一
系统文件这样写的:
# 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
192.168.1.222:3034 www.yyg.cn
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
但是直接输入www.yyg.cn访问不了网站,只能用ip+端口 192.168.1.222:3034这样访问,请大家看看是什么原因呢,哪里写错了吗
192.168.1.222 localhost
端口不是这样用的。
host文件里不能带端口。
浏览器访问的网址域名后面带端口。
http://www.cmhello.com/phpstudy-1.html
好咯,我找到方法了, ,还是谢谢大家
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号