Linux - Problem with NGINX and SABnzbd

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
niietzshe Offline
Senior Member
Posts: 145
Joined: Dec 2009
Reputation: 0
Post: #1
Hey all,
I have reverse proxy's working for sickrage and couchpotato, they work fine with their respective webroots, however I can't get sabnzbd to work. It'll show the admin user/pass window, then just direct me to http://localhost:8080/sabnzbd instead of returning the sab interface (sab is on a server, not the computer I'm on).

Here are my nginx settings:

proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;

location /sab {
                include /etc/nginx/proxy_params;
                proxy_pass http://localhost:8080;

So I think I need the equivalent of webroot for sab, as couch and sickrage work with this exact same setup. Anyone have any ideas or alternatives?

find quote
lrusak Offline
Posts: 436
Joined: Sep 2011
Reputation: 3
Location: Canada
Post: #2
I'll show you how I have mine.

First, I'm using SSL, because I have mine open to the internet. It can be reached at

I'm using some global files because I have many subdomains setup for couchpotato, sickbeard, etc.

It took me a while to set this all up properly so I thought I would share. also, if anyone has any comments please ask. I know my setup might not be perfect.

Also, if using SSL make sure to turn on HTTPS support within the sabnzbd config settings.

server {
  listen            80;
  listen            443 ssl spdy;
  include           /usr/local/etc/nginx/global.d/http.conf;
  include           /usr/local/etc/nginx/global.d/ssl.conf;  

  location / {            
    set                 $mobile_location /m;
    include             /usr/local/etc/nginx/global.d/mobile.conf;
    include             /usr/local/etc/nginx/global.d/proxy.conf;
    proxy_redirect      http:// https://;

  location /m {
    include             /usr/local/etc/nginx/global.d/proxy.conf;
    proxy_redirect      http:// https://;

and my proxy.conf
# Advanced Proxy Config
send_timeout             5m;
proxy_read_timeout         240;
proxy_send_timeout         240;
proxy_connect_timeout         240;

# Basic Proxy Config
proxy_set_header         Host $host;
proxy_set_header         X-Real-IP $remote_addr;
proxy_set_header         X-Forwarded-For $proxy_add_x_forwarded_for;

add_header                      Front-End-Https    on;
add_header                      Cache-Control "public, must-revalidate";
add_header                      Strict-Transport-Security max-age=15768000;

# redirect to https

if ( $scheme = http ) {
  return 301 https://$server_name$request_uri;

and ssl.conf
ssl                             on;
ssl_certificate                 /usr/local/etc/nginx/certs/self-ssl.crt;
ssl_certificate_key             /usr/local/etc/nginx/certs/self-ssl.key;

ssl_protocols                   SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers       on;
ssl_session_cache               shared:SSL:10m;
ssl_session_timeout             10m;

"PPC is too slow, your CPU has no balls to handle HD content." ~ davilla

OpenELEC Community Moderator
(This post was last modified: 2014-08-29 01:52 by lrusak.)
find quote
niietzshe Offline
Senior Member
Posts: 145
Joined: Dec 2009
Reputation: 0
Post: #3
Thanks for the reply, it'll be very useful when I go to setup ssl as well (I've generated the certs, just need to hook it up after I have http working).

The thing is, I think it's Sab that's the issue. I have exactly the same setup for couch and sick and they work fine. Sab in fact will show the login screen before returning an incorrect address, so that first bit works. Is there anything in sab that I should set similar to webroot? I tried changing the host from to localhost last night thinking that might do it (as nginx is pointing at localhost:8080), but no bananana.

I'll have a go tonight again.
find quote