php 在服务器上找不到 Localhost 或 phpMyAdmin:如何解决?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8868790/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 05:40:02  来源:igfitidea点击:

Localhost or phpMyAdmin not found on server: How to fix?

phpmysqlapachephpmyadmin

提问by Tinker

I followed installation instruction for PHP, MySQLand PHPMyAdmin. But when I tried to access http://localhost/phpmyadmin/, I got this error:

我按照PHP,MySQL和 的安装说明进行操作PHPMyAdmin。但是当我尝试访问时http://localhost/phpmyadmin/,出现此错误:

"Not Found The requested URL /phpmyadmin/ was not found on this server.".

“未找到请求的 URL /phpmyadmin/ 未在此服务器上找到。”。

Then I tried to access just the localhost, still I got same error.
How can i fix this problem?

然后我尝试只访问localhost,但仍然出现相同的错误。
我该如何解决这个问题?

I'm using windows 7 (if this problem has something to do with that)

我正在使用 Windows 7(如果这个问题与此有关)

采纳答案by Knossos

There really isn't enough information to be able to give you a reasonable answer.

确实没有足够的信息能够给你一个合理的答案。

First check that your Apache is running. Goto your start menu and type services.msc into the text field.

首先检查您的 Apache 是否正在运行。转到开始菜单并在文本字段中键入 services.msc。

Fairly high towards the top of the screen you will see ApacheX.X

在屏幕顶部相当高的位置,您将看到 ApacheX.X

See what the status of the service is. Try double-clicking on the Apache service and pressing Start if the service isn't running. If it has troubles starting you will get a message telling you the service couldn't be started.

查看服务的状态。如果服务未运行,请尝试双击 Apache 服务并按“启动”。如果启动出现问题,您将收到一条消息,告诉您无法启动该服务。

回答by Bakyaraj

1 sudo nano /etc/apache2/apache2.conf

1 须藤纳米 /etc/apache2/apache2.conf

2 search insert: "Include /etc/phpmyadmin/apache.conf" at the bottom of file. and restart apache2

2 在文件底部搜索插入:“Include /etc/phpmyadmin/apache.conf”。并重新启动apache2

sudo /etc/init.d/apache2 restart

须藤 /etc/init.d/apache2 重启

回答by MohitGhodasara

you just need to delete cookies from your browser

您只需要从浏览器中删除 cookie

press (ctrl + shift + delete) then

按 (ctrl + shift + delete) 然后

time range to clear : Everything

清除时间范围:一切

check -> Cookies then clear now

检查 -> Cookies 然后立即清除

done.

完毕。

回答by user2926564

I just finished installing xampp 1.8.2 on WinXP XP2 machine and got same error show up on my Firefox 24.0 browser:

我刚刚在 WinXP XP2 机器上安装了 xampp 1.8.2 并且在我的 Firefox 24.0 浏览器上显示了同样的错误:

xampp Not Found The requested URL /phpmyadmin/ was not found on this server.

找不到 xampp 在此服务器上找不到请求的 URL /phpmyadmin/。

I solved this problem by changing the proxy of my firefox browser, go to menu tools-Option find tab Network, click button settings. Fill the text box below No Proxy for with localhost.

我通过更改我的 Firefox 浏览器的代理解决了这个问题,转到菜单工具 - 选项查找选项卡网络,单击按钮设置。使用 localhost 填写 No Proxy for 下面的文本框。

In my case then it looklike:

在我的情况下,它看起来像:

192.168.1.0/24, localhost

Then press Ok, then Ok again.

然后按确定,然后再按确定。

Try now typing localhost/xampp then it should show Welcome to XAMPP for Windows!

现在尝试输入 localhost/xampp 然后它应该显示 Welcome to XAMPP for Windows!

Note: to change proxy for other browser may differ, check your browser help about how to change proxy.

注意:为其他浏览器更改代理可能会有所不同,请查看您的浏览器帮助以了解如何更改代理。

Hope this help.

希望这有帮助。

回答by ochwachi

I was just having this problem and i've come across an easier solution:

我刚刚遇到了这个问题,我遇到了一个更简单的解决方案:

left click on the wamp tray icon apache> apache modules> check the 'rewrite module'

左键单击 wamp 托盘图标 apache> apache modules> 检查“重写模块”

bingo!

答对了!

回答by Santosh Jami

Most likely it is the port conflict for apache server, by default is must be using port 80. You can goto apache configuration file, http.conf and change the port to a different one like: Listen 0.0.0.0:10021 This solved my issue. If using wamp, you can right click on wamp -> apache -> Use port other than 80, give a port number. Restart all wamp services.

很可能是 apache 服务器的端口冲突,默认情况下必须使用端口 80。您可以转到 apache 配置文件,http.conf 并将端口更改为不同的端口,例如:Listen 0.0.0.0:10021 这解决了我的问题. 如果使用wamp,可以右键wamp -> apache -> 使用80以外的端口,给出端口号。重新启动所有 wamp 服务。

回答by Sibajee Ray

If you are not able to access localhost:
One possible reason might be is your apache server is not started. Go to start menu of your computer and search services, open it, find Apache, start the program.(Considering all the configuration of PHP and Apache has done correctly)

如果您无法访问 localhost
一个可能的原因可能是您的 apache 服务器未启动。进入电脑的开始菜单,搜索服务,打开,找到Apache,启动程序。(考虑到PHP和Apache的所有配置都已正确完成)

If you are not able to access localhost/phpmyadmin: First of all, add phpmyadmin folder to your working directory. Download it from https://www.phpmyadmin.netand unzip it. Add the folder to your working directory and change the name to phpmyadmin. Now you can access localhost/phpmyadmin. You will see a login page of PhpMyAdmin application. If you are seeing file directories instead of the login page, then go to your apache server's httpd.conf(apache/conf/httpd.conf) file. Edit it and change the index.html of DirectoryIndex to index.php

如果您无法访问 localhost/phpmyadmin:首先,将 phpmyadmin 文件夹添加到您的工作目录。从https://www.phpmyadmin.net下载并解压。将该文件夹添加到您的工作目录并将名称更改为 phpmyadmin。现在您可以访问 localhost/phpmyadmin。您将看到 PhpMyAdmin 应用程序的登录页面。如果您看到的是文件目录而不是登录页面,请转到 apache 服务器的 httpd.conf(apache/conf/httpd.conf) 文件。编辑一下,把DirectoryIndex的index.html改成index.php

<IfModule dir_module>
  DirectoryIndex index.php
</IfModule>