Skip to content

Instantly share code, notes, and snippets.

@thanh4890
Last active Feb 11, 2020
Embed
What would you like to do?
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name _;
root /usr/share/nginx/html;
ssl_certificate "/etc/letsencrypt/live/camelot.ai/fullchain.pem"; //REPLACE THE DOMAIN NAME WITH YOURS
ssl_certificate_key "/etc/letsencrypt/live/camelot.ai/privkey.pem"; //REPLACE THE DOMAIN NAME WITH YOURS
# It is *strongly* recommended to generate unique DH parameters
# Generate them with: openssl dhparam -out /etc/pki/nginx/dhparams.pem 2048
#ssl_dhparam "/etc/pki/nginx/dhparams.pem";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP;
ssl_prefer_server_ciphers on;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://127.0.0.1:5000; //REPLACE THIS WITH THE PORT TO YOUR APP
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://camelot.ai; //REPLACE THIS WITH YOUR DOMAIN
}
@thanh4890
Copy link
Author

thanh4890 commented Feb 11, 2020

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