SIEMbitwardendnscrypthome assistantjellyfinjitsimulti-factor authenticationnextcloudonlyofficepiholeraspberry pirocket.chatsyncthingtorwazuhwireguard
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
891 B
29 lines
891 B
map $http_x_forwarded_proto $redirect_scheme { |
|
default $scheme; |
|
https https; |
|
} |
|
|
|
server { |
|
listen 80; |
|
listen [::]:80; |
|
server_name ${SERVER_NAME}; |
|
|
|
# cherry picked from https://github.com/schmunk42/docker-nginx-redirect/pull/8 |
|
if ($request_method = POST) { |
|
return ${SERVER_REDIRECT_POST_CODE} ${SERVER_REDIRECT_SCHEME}://${SERVER_REDIRECT}${SERVER_REDIRECT_PATH}; |
|
} |
|
|
|
if ($request_method ~ PUT|PATCH|DELETE) { |
|
return ${SERVER_REDIRECT_PUT_PATCH_DELETE_CODE} ${SERVER_REDIRECT_SCHEME}://${SERVER_REDIRECT}${SERVER_REDIRECT_PATH}; |
|
} |
|
|
|
return ${SERVER_REDIRECT_CODE} ${SERVER_REDIRECT_SCHEME}://${SERVER_REDIRECT}${SERVER_REDIRECT_PATH}; |
|
|
|
# redirect server error pages to the static page /50x.html |
|
# |
|
error_page 500 502 503 504 /50x.html; |
|
location = /50x.html { |
|
root /usr/share/nginx/html; |
|
} |
|
|
|
} |