I have NZBGet running on port 6789 and SSL on port 6790. I am able to access both internally and externally by specifying my domain_name:port.
My nzbget.conf file looks like so:
upstream nzbget_server {
server 0.0.0.0:6789 fail_timeout=0;
}
server {
listen 81;
server_name nzbget.mydomain.com;
access_log /var/log/nginx/nzbget.access.log;
location ~ ^/($|./*) {
client_max_body_size 50M;
proxy_set_header Host $host;
proxy_pass http://nzbget_server;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/nzbget.mydomain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/nzbget.mydomain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
This works perfectly fine and I am able to access SSL through https://nzbget.mydomain.com, however the port that it connects to (as specified in the conf file) is still 6789 which is not an SSL port.
I have tried to change my nzbget.conf to:
upstream nzbget_server {
server 0.0.0.0:6790 fail_timeout=0;
}
This however does not work, though I am still able to access NZBGet through https://my_ip:6790. How can I configure NGiNX to connect through the SSL port?
Edited 1 time(s). Last edit at 11/10/2017 05:43PM by raphattack.