server { listen 443 ssl http2; server_name osp.server.tld; #access_log /var/log/nginx/osp.server.tld.access.gz main buffer=16k gzip=9 flush=5m; error_log /var/log/nginx/osp.server.tld.error; charset utf-8; auth_basic "Authentication needed"; auth_basic_user_file /var/www/osp.server.tld/.htpasswd; location / { proxy_pass http://127.0.0.1:8585; } #include config/gzip.conf; # Wildcard certificate config #include ssl/server.tld.conf; #include config/ssl.conf; } server { listen 80; server_name osp.server.tld; return 301 https://osp.server.tld$request_uri; }