简体   繁体   English

http:// localhost /不使用EasyPHP

[英]http://localhost/ not working with EasyPHP

I've verified my host file in windows/system32/drivers/etc/ has an entry for localhost in it, but it's not going anywhere. 我已经验证了我的主机文件在windows/system32/drivers/etc/有一个localhost的条目,但它不会去任何地方。 I have to have a port number in the URL: http://127.0.0.1:8888/ 我必须在URL中有一个端口号: http//127.0.0.18888 /

Is there anything I can do to get localhost working without the need for a port number? 有什么办法可以让localhost在不需要端口号的情况下工作吗?

For windows 8 users, you should also make sure that you are running it as administrator. 对于Windows 8用户,您还应确保以管理员身份运行它。

Right click on easyPHP shortcut and change the compatibility setting to always run as administrator. 右键单击easyPHP快捷方式并将兼容性设置更改为始终以管理员身份运行。

After this, make sure the "httpd.conf" file in "C:\\Program Files (x86)\\EasyPHP-12.1\\conf_files" 在此之后,确保“C:\\ Program Files(x86)\\ EasyPHP-12.1 \\ conf_files”中的“httpd.conf”文件

Has this line in it: 这条线有:

Listen 127.0.0.1:80 听127.0.0.1:80

To verify that you had my problem, check 127.0.0.1:8887/ 要验证您是否遇到问题,请查看127.0.0.1:8887/

Your EasyPHP is probably configured to listen on port 8888. 您的EasyPHP可能配置为侦听端口8888。

You must configure EasyPHP to listen on port 80 as well. 您必须配置EasyPHP以侦听端口80。

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. 为了您的信息,HTTP的默认端口是端口80,因此当您不在URL中提供任何端口信息时,您的浏览器将尝试在端口80上进行连接。

You can follow this tutorial : http://technology.ohmygoh.com/easyphp-how-to-change-apache-server-port/ 您可以按照本教程: http//technology.ohmygoh.com/easyphp-how-to-change-apache-server-port/

Find in httpd.conf below... Options FollowSymLinks Indexes AllowOverride None Order deny,allow Allow from 127.0.0.1 在下面的httpd.conf中查找...选项FollowSymLinks索引AllowOverride无顺序拒绝,允许从127.0.0.1允许

And add line like this: Allow from ::1 并添加如下所示的行:允许来自:: 1

Result: Options FollowSymLinks Indexes AllowOverride None Order deny,allow Allow from 127.0.0.1 Allow from ::1 结果:选项FollowSymLinks索引AllowOverride无顺序拒绝,允许允许来自127.0.0.1允许来自:: 1

And restart apache..:) 并重启apache .. :)

Following these steps may solve your problem: 遵循这些步骤可以解决您的问题:

  • from EasyPHP icon right click -> properties 从EasyPHP图标右键单击 - >属性
  • select "Compatibility" tab 选择“兼容性”选项卡
  • check "Run this program in compatibility mode for:" and select Windows 7 选中“在兼容模式下运行此程序:”并选择Windows 7

Try editing conf_files/httpd.conf. 尝试编辑conf_files / httpd.conf。

Change values listed as 8888 to 80, and you should not need to use a port on restart. 将列为8888的值更改为80,您不需要在重新启动时使用端口。

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

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. 我今天遇到了同样的麻烦,当我试图通过EasyPHP程序更改端口来解决这个问题时,这并没有解决。 If this occurs try go to folder program/apache/conf and manually change httpd.conf : 如果发生这种情况,请转到文件夹program/apache/conf并手动更改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 . 这里程序文件夹的httpd表示127.0.0.1:80而httpd conf apache文件夹显示127.0.0.1:8887

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

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 对于http url,默认端口为80.即http:// localhost等于http:// localhost:80 ,这也等于ip-http://127.0.0.1

like Krtek said you can refer the tutorial in a reverse way. 像Krtek说你可以反过来参考教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM