当我安装Php、PhpMyAdmin和Nginx时,我用以下代码文件来接收这个文件,而不是访问
http://localhost:80/phpmyadmin
<?php
declare(strict_types=1);
use PhpMyAdmin\Routing;
if (! defined('ROOT_PATH')) {
// phpcs:disable PSR1.Files.SideEffects
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
// phpcs:enable
}
global $route, $containerBuilder;
require_once ROOT_PATH . 'libraries/common.inc.php';
$dispatcher = Routing::getDispatcher();
Routing::callControllerForRoute($route, $dispatcher, $containerBuilder);
我像这个phpmyadmin 404 error in nginx一样修复了404错误,但是在那之后我收到了上面的错误。对不起我的英语不好。
发布于 2022-09-12 10:02:01
步骤1:您需要使用命令行检查nginx服务器的状态:
sudo service nginx status
如果nginx服务器没有活动,请尝试使用sudo service nginx restart
步骤2: are两种解决方案为您提供1,使用以下命令行停止服务器apache2:
sudo service apache2 stop
重新启动nginx服务器:
sudo service nginx restart
再次检查状态nginx服务器,现在应该没事了。2,更改端口apache2您需要更改两个文件/etc/httpd/conf/httpd.conf
和/etc/apache2/ports.conf
例如,我将端口apache2从80更改为8888:
sudo nano /etc/apache2/ports.conf
和将Listen 80
更改为Listen 8888
sudo nano /etc/apache2/ports.conf
和将<VirtualHost: *:80>
更改为<VirtualHost: *:8080>
然后,重新启动apache2服务器和nginx服务器:
sudo service apache2 restart
重新启动nginx服务器:sudo service nginx restart
如果你想问什么,请留下评论。
https://stackoverflow.com/questions/73686178
复制相似问题