Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nginx.conf for reverse-proxy with HTTPS #265

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion root/etc/nginx/fastcgi_params
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param HTTPS $fe_https;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
Expand Down
4 changes: 4 additions & 0 deletions root/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ http {
open_file_cache max=100;
client_max_body_size 100M;

map $http_x_forwarded_proto $fe_https {
default $https;
https on;
}

upstream php-upstream {
server 127.0.0.1:9000;
Expand Down