Nginx出现The plain HTTP request was sent to HTTPS port问题解决方法

(编辑:jimmy 日期: 2024/9/23 浏览:2)

今天在配置Nginx+SSL的时候出现如题的错误,后来与度娘一番云雨之后找到一个解决方法,挺有用,随手转之。

一般在vhost的配置中会有php解析的一段,如:
复制代码 代码如下:
location ~ .*\.(php|php5)"" target="_blank" href="http://stackoverflow.com/questions/4848438/fastcgi-application-behind-nginx-is-unable-to-detect-that-https-secure-connectio">stackoverflow/nginx#1/nginx#2