Skip to content

Commit

Permalink
fix(nginx): fix mapping https
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Oct 25, 2021
1 parent bcf7127 commit 7793619
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ http {
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

map $scheme $fastcgi_https { ## Detect when HTTPS is used
map $http_x_forwarded_proto $fastcgi_https { ## Detect when HTTPS is used
default off;
https on;
}

}
7 changes: 4 additions & 3 deletions nginx/php_fastcgi.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
fastcgi_keep_conn on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS $fastcgi_https if_not_empty;
fastcgi_param SERVER_PORT $http_x_forwarded_port;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS $fastcgi_https if_not_empty;
fastcgi_param SERVER_PORT $http_x_forwarded_port;
fastcgi_param REQUEST_SCHEME $http_x_forwarded_proto;
fastcgi_connect_timeout 600s;
fastcgi_read_timeout 600s;

0 comments on commit 7793619

Please sign in to comment.