Created
March 20, 2021 19:39
-
-
Save dgacitua/19ef2d1b8f594b2e45d176bc873b0357 to your computer and use it in GitHub Desktop.
Nginx configuration file for a static HTML server using a secure connection with Let's Encrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name mydomain.org www.mydomain.org; | |
return 301 https://mydomain.org$request_uri; | |
} | |
server { | |
listen 443 ssl default_server; | |
server_name mydomain.org www.mydomain.org; | |
root /home/myuser/html; | |
index index.html; | |
try_files $uri /index.html; | |
ssl_certificate /etc/letsencrypt/live/mydomain.org/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/mydomain.org/privkey.pem; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
ssl_session_timeout 5m; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment