解决安装SSL后phpmyadmin出现的1045错误

2013-12-05 12:05:35

[网站记录 | Web Dev] , , ,

装完SSL后,突然发现PHPMyAdmin 登不上去了,出现了1045错误.

 

上网查了一下,问题的主要原因是Nginx没有配置,装SSL的时候PHP的Fast CGI 也要进行配置.

 

 

其实解决这个问题倒也简单,

只需要在Nginx的配置文件里面添加这一行就行了,位置是在PHP的参数里面.

 

 

fastcgi_param HTTPS on;

 

 

于是整个PHP的配置文件如下

 

 

        location ~ \.php$ {
                add_header      Cache-Control   no-cache;


                fastcgi_pass    unix:/var/run/php-fpm/php-fcgi.sock;
                fastcgi_index   index.php;
                fastcgi_param   SCRIPT_FILENAME         $document_root$fastcgi_script_name;
                fastcgi_param   HTTPS                   on;
                include                 fastcgi_params;
        }

 

 

这篇博文发表在 网站记录 | Web Dev 目录下,标签为 , , ,
如需引用,请使用链接:https://note.mc256.dev/?p=148

This article published in 网站记录 | Web Dev with tags , , , .
Cite this page using this link:https://note.mc256.dev/?p=148

您的邮箱地址不会被公开,评论使用Gravatar头像。
Your email address will not be published. This blog is using Gravatar.

正在提交评论... Submitting ...
正在为您准备评论控件 Loading Comment Plugin
Copyright © 2013-2024 mc256. All Rights Reserved.
Powered by WordPress on top of a dual-stack k3s Cluster using JuiceFS.
Wordpress Theme Designed By mc256.
Encrypted By Let's Encrypt.  Hosted On Linode + OVH + AWS.
DNS Provided By Hostker.
Status Page by CloudFlare Worker.