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

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

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

  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. root /var/www/phpmyadmin;
  5. index index.php index.html;
  6. server_name phpmyadmin.local;
  7. location / {
  8. try_files $uri $uri/ =404;
  9. }
  10. # pass PHP scripts to FastCGI server
  11. #
  12. location ~ \.php$ {
  13. include snippets/fastcgi-php.conf;
  14. #
  15. # # With php-fpm (or other unix sockets):
  16. fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
  17. # # With php-cgi (or other tcp sockets):
  18. # fastcgi_pass 127.0.0.1:9000;
  19. }

字符串
}
它在说:
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,尝试逐个写入这些行

  1. $cfg['ForceSSL'] = false;
  2. $cfg['Servers'][$i]['ForceSSL'] = false;
  3. $cfg['Servers'][$i]['ssl'] = false;
  4. $cfg['Servers'][$i]['ssl_verify'] = false;
  5. $cfg['Servers'][$i]['control_ssl'] = false;
  6. $cfg['PmaAbsoluteUri'] = 'http://phpmyadmin.local/';


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

ttp71kqs

ttp71kqs1#

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

相关问题