Incorrect or missing information? How to hide SABnzbd behind a Reverse Proxy
Assuming the server is already running correctly and SABnzbd is running on http://localhost:8080
.
What is a Reverse Proxy?
A reverse proxy, also known as an "inbound" proxy is a server that receives requests from the Internet and forwards (proxies) them to a small set of servers, usually located on an internal network and not directly accessible from outside. A reverse proxy can be used to allow authenticated users access to an intranet even when they are located outside. Users on the internal network can access intranet servers directly (their IP address is their authentication), but users outside it must authenticate themselves to the proxy server (usually with a username and password) in order to be allowed in.
Why use a Reverse Proxy?
Lets say you have SABnzbd, Sonarr, and Radarr installed and working locally.
To get to each of these you would navigate to their web server's ip:port
.
Depending on how you setup the apps (binding an IP to your network adapter) you may not be able to get to the sites outside your network.
NOTE You can use your cellphone with WiFi turned off if you want an easy way to test access outside your network.
So while most likely the apps are running on the same machine then you just have to change the port, but this is not very user friendly.
Using a reverse proxy you could just go to an IP (or hostname if you use dyndns or something similar) but then use /sabnzbd
, /sonarr
, /whatever
instead of a different port. Not only does this make accessing your multiple apps more user friendly, it allows flexibility of being a gatekeeper to all the sites (for access/security/data logging).
Below are sample configurations for the two main webservers, Apache and Ngnix:
Apache 2
Required modules: proxy.load
and proxy_http.load
.
The following goes in Apache's httpd.conf
file.
For Linux: /etc/apache2/httpd.conf
and for Windows: C:\Program Files\Apache2.2\conf\httpd.conf
.
NOTE On Apache 2.4 Config files for a2enmod
and proxy proxy_http
are located in:
/etc/apache2/sites-available/000-default.conf
(for HTTP) and *ssl*.conf
(for HTTPS).
Nginx
The following files go in the nginx conf.d
directory /etc/nginx/conf.d/
.