http://localhost/ 无法使用 EasyPHP
我已经验证了 windows/system32/drivers/etc/
中的主机文件中有一个 localhost 条目,但它不会去任何地方。我必须在 URL 中包含端口号: http://127.0.0.1:8888/
我可以做些什么来获取localhost
无需端口号即可工作?
I've verified my host file in windows/system32/drivers/etc/
has an entry for localhost in it, but it's not going anywhere. I have to have a port number in the URL: http://127.0.0.1:8888/
Is there anything I can do to get localhost
working without the need for a port number?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
您的 EasyPHP 可能配置为侦听端口 8888。
您还必须将 EasyPHP 配置为侦听端口 80。
供您参考,HTTP 的默认端口是端口 80,因此当您未在 url 中提供任何端口信息时,您的浏览器将尝试在端口 80 上进行连接。
您可以按照本教程进行操作:http://technology.ohmygoh.com/easyphp-how-to-change-apache-服务器端口/
Your EasyPHP is probably configured to listen on port 8888.
You must configure EasyPHP to listen on port 80 as well.
For your information, the default port for HTTP is the port 80, so when you don't give any port information in the url, your browser is trying to connect on port 80.
You can follow this tutorial : http://technology.ohmygoh.com/easyphp-how-to-change-apache-server-port/
对于 Windows 8 用户,您还应该确保以管理员身份运行它。
右键单击 easyPHP 快捷方式并将兼容性设置更改为始终以管理员身份运行。
之后,确保“C:\Program Files (x86)\EasyPHP-12.1\conf_files”中的“httpd.conf”文件中
有此行:
Listen 127.0.0.1:80
要验证您是否遇到了我的问题,请检查127.0.0.1:8887/
For windows 8 users, you should also make sure that you are running it as administrator.
Right click on easyPHP shortcut and change the compatibility setting to always run as administrator.
After this, make sure the "httpd.conf" file in "C:\Program Files (x86)\EasyPHP-12.1\conf_files"
Has this line in it:
Listen 127.0.0.1:80
To verify that you had my problem, check 127.0.0.1:8887/
尝试编辑conf_files/httpd.conf。
将列出的值从 8888 更改为 80,这样您就不需要在重新启动时使用端口。
Try editing conf_files/httpd.conf.
Change values listed as 8888 to 80, and you should not need to use a port on restart.
在下面的 httpd.conf 中找到...
选项 FollowSymLinks 索引
允许覆盖无
订单拒绝、允许
允许来自 127.0.0.1
并添加如下行:
允许来自::1
结果:
选项 FollowSymLinks 索引
允许覆盖无
订单拒绝、允许
允许来自 127.0.0.1
允许来自 ::1
并重新启动 apache..:)
Find in httpd.conf below...
Options FollowSymLinks Indexes
AllowOverride None
Order deny,allow
Allow from 127.0.0.1
And add line like this:
Allow from ::1
Result:
Options FollowSymLinks Indexes
AllowOverride None
Order deny,allow
Allow from 127.0.0.1
Allow from ::1
And restart apache..:)
按照以下步骤可能会解决您的问题:
Following these steps may solve your problem:
您可以尝试在端口 80 上运行您的网络服务器。
You can try to run your webserver on Port 80.
对于 http url,默认端口 80。即 http://localhost 等于 http://localhost:80 这也等于 ip-http://127.0.0.1
就像 Krtek 所说,你可以以相反的方式参考教程。
for an http url the default port 80. ie http://localhost is equal to http://localhost:80 which is also equals to the ip-http://127.0.0.1
like Krtek said you can refer the tutorial in a reverse way.
默认端口是8887
按F7功能键在浏览器中打开
default port is 8887
press F7 function key to open in browser
我今天遇到了同样的问题,当我尝试通过 EasyPHP 程序更改端口来解决此问题时,这并没有解决。如果发生这种情况,请尝试转到文件夹
program/apache/conf
并手动更改httpd.conf
:此处程序文件夹的
httpd
表示127.0.0.1:80
而 httpd conf apache 文件夹显示127.0.0.1:8887
。I had the same trouble today and when I tried to fix this by changing the port by the EasyPHP program, this didn't resolve. If this occurs try go to folder
program/apache/conf
and manually changehttpd.conf
:Here the
httpd
of the program folder indicates127.0.0.1:80
while httpd conf apache folder show127.0.0.1:8887
.