Skip to content

Instantly share code, notes, and snippets.

@GamePlayer-8
Created July 19, 2023 07:47
Show Gist options
  • Save GamePlayer-8/87a1deeac2e2056817e7ed2559bbeb49 to your computer and use it in GitHub Desktop.
Save GamePlayer-8/87a1deeac2e2056817e7ed2559bbeb49 to your computer and use it in GitHub Desktop.
nginx_default_ssl.conf
listen 443 ssl;
listen [::]:443 ssl;
limit_conn conn_limit_per_ip 40;
limit_req zone=req_limit_per_ip burst=40 nodelay;
proxy_hide_header X-Frame-Options;
include nginx_letsencrypt.conf;
include nginx_blocklist.conf;
#if ($request_method !~ ^(GET|HEAD|POST)$) { return 444; } # optional, may cause problems for advanced webapps
absolute_redirect off;
error_page 497 =301 https://$host:443$request_uri;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment