Hi @abasle,
Here’s an example NGINX .conf
configuration file that works alongside Certbot, which uses Let’s Encrypt to generate SSL certificates (Certbot should automatically manage the private keys):
server {
listen 80;
server_name <YOUR_URL>;
access_log /var/log/nginx/<YOUR_URL>.http.access.log;
error_log /var/log/nginx/<YOUR_URL>.http.error.log;
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl;
server_name <YOUR_URL>;
access_log /var/log/nginx/<YOUR_URL>.access.log;
error_log /var/log/nginx/<YOUR_URL>.error.log;
location / {
proxy_pass http://127.0.0.1:39000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Forwarded-For $remote_addr;
proxy_request_buffering off;
proxy_buffering off;
client_max_body_size 0;
}
ssl_certificate /etc/letsencrypt/live/<YOUR_URL>/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/<YOUR_URL>/privkey.pem; # managed by Certbot
}