Add this line:
fastcgi_param HTTPS on;
To this block in /usr/local/etc/nginx/nginx.conf:
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0" in php.ini
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_intercept_errors on;
#fastcgi_pass 127.0.0.1:9000; #pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
fastcgi_pass unix:/tmp/php-fpm.sock;
}
Reference:
http://blog.chrismeller.com/getting-php-https-detection-working-in-nginx
No comments:
Post a Comment