TUTORIAL: Securing SABnzbd+ behind nginx authentication
Posted: July 3rd, 2008, 4:08 pm
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:
Change the allow directive above to match your LAN or set to 127.0.0.1 for local access.
Create password file:
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.
Assuming:
- Nginx is already installed and working (http://wiki.codemongers.com/NginxGettingStarted)
- You have a basic unix skills and understanding of nginx configuration files
- SABnzbd+ bound to 127.0.0.1 on port 9005
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;
}
Create password file:
Code: Select all
htpasswd -c /opt/sabnzbdplus/access_list username