http to https redirect

This commit is contained in:
bunkerity
2020-03-28 23:05:05 +01:00
parent d5f8c7647d
commit 834afa1327
5 changed files with 82 additions and 43 deletions

View File

@@ -70,6 +70,9 @@ http {
# disable default server
%DISABLE_DEFAULT_SERVER%
# redirect HTTP to HTTPS
%REDIRECT_HTTP_TO_HTTPS%
# geoip2 config
geoip2 /etc/nginx/geoip.mmdb {
auto_reload 5m;

View File

@@ -0,0 +1,5 @@
server {
listen 80;
server_name %SERVER_NAME%;
return 301 https://$host$request_uri;
}