http://localhost/ 无法使用 EasyPHP

发布于 2024-10-20 07:44:00 字数 219 浏览 6 评论 0原文

我已经验证了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

江挽川 2024-10-27 07:44:00

您的 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/

几味少女 2024-10-27 07:44:00

对于 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/

软糖 2024-10-27 07:44:00

尝试编辑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.

可是我不能没有你 2024-10-27 07:44:00

在下面的 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..:)

魂归处 2024-10-27 07:44:00

按照以下步骤可能会解决您的问题:

  • 从 EasyPHP 图标右键单击 ->属性
  • 选择“兼容性”选项卡
  • 选中“以兼容模式运行此程序:”并选择 Windows 7

Following these steps may solve your problem:

  • from EasyPHP icon right click -> properties
  • select "Compatibility" tab
  • check "Run this program in compatibility mode for:" and select Windows 7
尴尬癌患者 2024-10-27 07:44:00

您可以尝试在端口 80 上运行您的网络服务器。

You can try to run your webserver on Port 80.

友欢 2024-10-27 07:44:00

对于 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.

屋檐 2024-10-27 07:44:00

默认端口是8887
按F7功能键在浏览器中打开

default port is 8887
press F7 function key to open in browser

七色彩虹 2024-10-27 07:44:00

我今天遇到了同样的问题,当我尝试通过 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 change httpd.conf:

Here the httpd of the program folder indicates 127.0.0.1:80 while httpd conf apache folder show 127.0.0.1:8887.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文