win8.1搭建 Apache + PHP + MySQL 环境。只有localhost可以访问 !

WBOY
Release: 2016-06-23 14:22:22
Original
1107 people have browsed it

昨天刚安装win8.1企业版,然后搭建了 Apache + PHP + MySQL 环境的服务器,发现只有locahost可以访问,域名不可以访问,就连127.0.0.1也无法访问,不知道是什么原因。求高手指点!


回复讨论(解决方案)

hosts 做个绑定就是了 这个有时候可能是某些安全工具引起的

hosts绑定做过了,ping那个域名可以ping通。就是访问不了。
127.0.0.1       ce1.test.com
地址栏中输入http://localhost可以访问。
地址栏中输入http://127 .0.0.1不可以访问。
地址栏中输入http://ce1.test.com(hosts绑定的域名)不可以访问!

http://localhost可以访问
http://127 .0.0.1不可以访问
是没有道理的!
看看 Listen 什么设置的
还有 ServerName

都没问题的话,就可能与系统有关了(win8还真没用过)

也可以试试把apache的端口改成8081试试!

http://ce1.test.com 不能访问是提示什么,最好贴个截图出来。

两张截图!求高手指点!


http://localhost正常访问!

换个端口试试,我当时也遇到这个问题了,果断回到win7了

端口换过,无效!!!!!!!!!11

不知道 !!!!!!!!!

关闭浏览器,在域名后面加点随机数
ce1.test.com?t=1112323

用域名访问的话,必须打开rewrite扩展和vohosts模块吧

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!