图文详解TCP_IP基础原理和技术电子书pdf下载
今天在配置nginx的https支持,把phpmyadmin放在一个子目录下,即https://ip/phpmyadmin,登录出现The plain HTTP request was sent to HTTPS port错误,现给出解决方法:
1.在location ~ .php$区域添加fastcgi_param HTTPS on;如以下代码:
location ~ \.php$ {
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
}
2.在http区域添加
map $scheme $fastcgi_https {
default off;
https on;
}
如例子:
http
{
map $scheme $fastcgi_https {
default off;
https on;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
.........
}
之后重载nginx即生效.
转载请标明文章来源:《http://www.centos.bz/2011/12/the-plain-http-request-was-sent-to-https-port/》
转载请注明:谷谷点程序 » phpmyadmin错误The plain HTTP request was sent to HTTPS port