Page 1 of 1

TUTORIAL: Securing SABnzbd+ behind nginx authentication

Posted: July 3rd, 2008, 4:08 pm
by ju1ced
This tutorial will show you how to secure your SABnzbd+ server behind nginx, utilizing htpasswd authentication. The method I've chosen to use will result in all WAN access being required to authenticate, while still allowing LAN connections access without authentication.

Assuming:
nginx.conf

Code: Select all

        location /sabnzbd {
                satisfy_any on;
                allow 192.168.0.0/24;
                deny all;
                auth_basic "SABnzbd+ Authentication Required";
                auth_basic_user_file /opt/sabnzbdplus/access_list;
                proxy_pass http://127.0.0.1:9005/sabnzbd;
        }
Change the allow directive above to match your LAN or set to 127.0.0.1 for local access.


Create password file:

Code: Select all

htpasswd -c /opt/sabnzbdplus/access_list username
Thanks to Undertow for all the text ripped from his post about doing the same with lighthttpd http://forums.sabnzbd.org/index.php?topic=777.0.