Skip to content

Instantly share code, notes, and snippets.

@iqbwl
Created February 26, 2026 16:26
Show Gist options
  • Select an option

  • Save iqbwl/48b0455a820e61dfb5d2c5323c3f1f9d to your computer and use it in GitHub Desktop.

Select an option

Save iqbwl/48b0455a820e61dfb5d2c5323c3f1f9d to your computer and use it in GitHub Desktop.
Server Block Nginx Default: /etc/nginx/sites-available/default
##
# Default Catch-All HTTP Server
##
server {
listen 80 default_server;
server_name _;
return 444;
}
##
# Default Catch-All HTTPS Server
# HTTP/2 and HTTP/3 enabled (modern syntax)
##
server {
# TCP listener (TLS)
listen 443 ssl default_server;
# Enable HTTP/2 (new syntax)
http2 on;
# QUIC listener (UDP) for HTTP/3
#listen 443 quic reuseport default_server;
server_name _;
ssl_protocols TLSv1.2 TLSv1.3;
# Reject TLS handshake before certificate exchange
ssl_reject_handshake on;
}
@iqbwl

iqbwl commented Feb 26, 2026

Copy link
Copy Markdown
Author

nginx version: nginx/1.26.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment