Skip to content

Commit cae24c4

Browse files
author
António P. P. Almeida
committed
* Fixed the wrong $https variable in fastcgi_params.
1 parent d5ad24d commit cae24c4

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

fastcgi_params

+7-2
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2323

2424
## PHP only, required if PHP was built with --enable-force-cgi-redirect
2525
fastcgi_param REDIRECT_STATUS 200;
26-
## HTTPS 'on' parameter.
27-
fastcgi_param HTTPS $https_if_not_empty;
26+
## HTTPS 'on' parameter. This requires Nginx version 1.1.11 or
27+
## later. The if_not_empty flag was introduced in 1.1.11. See:
28+
## http://nginx.org/en/CHANGES. If using a version that doesn't
29+
## support this comment out the line below.
30+
fastcgi_param HTTPS $https if_not_empty;
31+
## For Nginx versions below 1.1.11 uncomment the line below after commenting out the above.
32+
#fastcgi_param HTTPS $https

map_https_fcgi.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- mode: conf; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
22
### Implement the $https_if_not_empty variable for Nginx versions below 1.1.11.
33

4-
map $scheme $https_if_not_empty {
4+
map $scheme $https {
55
default '';
66
https on;
77
}

sites-available/example.com.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ server {
9898
limit_conn arbeit 10;
9999

100100
## Access and error logs.
101-
access_log /var/log/nginx/example.com_access.log;
102-
error_log /var/log/nginx/example.com_error.log;
101+
access_log /var/log/nginx/example.com_access.log;
102+
error_log /var/log/nginx/example.com_error.log;
103103

104104
## Keep alive timeout set to a greater value for SSL/TLS.
105105
keepalive_timeout 75 75;

0 commit comments

Comments
 (0)