在没有SSL/HTTPS的情况下运行phpMyAdmin

gcuhipw9  于 2023-11-19  发布在  PHP
关注(0)|答案(1)|浏览(223)

我刚刚将phpMyAdmin从git克隆到/var/www/
/etc/nginx/sites-enabled/phpmyadmin.conf是:

server {
    listen 80;
    listen [::]:80;

    root /var/www/phpmyadmin;

    index index.php index.html;

    server_name phpmyadmin.local;

    location / {
            try_files $uri $uri/ =404;
    }

    # pass PHP scripts to FastCGI server
    #
    location ~ \.php$ {
            include snippets/fastcgi-php.conf;
    #
    #       # With php-fpm (or other unix sockets):
            fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
    #       # With php-cgi (or other tcp sockets):
    #       fastcgi_pass 127.0.0.1:9000;
    }

字符串
}
它在说:
There is a mismatch between HTTPS indicated on the server and client. This can lead to a non working phpMyAdmin or a security risk. Please fix your server configuration to indicate HTTPS properly.
我想在没有SSL的情况下运行它。
我没有文件config.inc.php,但我在主目录phpmyadmin/中有config.sample.inc.php,在此文件中没有行$cfg['ForceSSL'] = false;
phpmyadmin/config.sample.inc.php复制到phpmyadmin/config.inc.php,尝试逐个写入这些行

$cfg['ForceSSL'] = false;
$cfg['Servers'][$i]['ForceSSL'] = false;
$cfg['Servers'][$i]['ssl'] = false;
$cfg['Servers'][$i]['ssl_verify'] = false;
$cfg['Servers'][$i]['control_ssl'] = false;
$cfg['PmaAbsoluteUri'] = 'http://phpmyadmin.local/';


但仍然是相同的错误消息!

ttp71kqs

ttp71kqs1#

将示例配置文件复制到php.inc.php并在那里放置所需的设置。

相关问题