Last active
November 5, 2020 12:04
-
-
Save Harsimran1/22bed16c4f4416cda1b5fb4346b76f7d to your computer and use it in GitHub Desktop.
Nginx conf with ssl termination.
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 _; | |
# Redirect all traffic to SSL | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
ssl on; | |
# Add the location of the certs downloaded using certbot from CA Let's Encrypt. | |
ssl_certificate /etc/letsencrypt/live/www.eresume.tech/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/www.eresume.tech/privkey.pem; | |
location / { | |
# the /sites/default is the name of folder which contains the website content. | |
root /sites/default; | |
index index.htm index.html; | |
# uncomment below line if you have a server running on host with port 8080. | |
# proxy_pass http://127.0.0.1:8080; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment