Skip to content

Instantly share code, notes, and snippets.

@jyotendra
Created May 16, 2021
Embed
What would you like to do?
proxy server with for port 3000 with ssl enabled
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
}
@jyotendra
Copy link
Author

jyotendra commented May 16, 2021

Guide to create ssl-cert with certbot.
While creating ssl cert, it's probably important to link to actual domain (not sure about this).

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