proxy server with for port 3000 with ssl enabled
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
GNU nano 4.8 metabase.com # sample nginx.conf | |
# proxy requests to Metabase instance | |
server { | |
listen 80; | |
listen [::]:80; | |
listen 443 ssl; # managed by Certbot | |
ssl_certificate /etc/letsencrypt/live/metabase.covidindiaresources.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/metabase.covidindiaresources.com/privkey.pem; | |
server_name metabase.covidindiaresources.com; | |
location / { | |
proxy_pass http://127.0.0.1:3000; | |
} | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
# Redirect non-https traffic to https | |
if ($scheme != "https") { | |
return 301 https://$host$request_uri; | |
} # managed by Certbot | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Guide to create ssl-cert with certbot.
While creating ssl cert, it's probably important to link to actual domain (not sure about this).