diff --git a/Reverse-Proxy.md b/Reverse-Proxy.md index ca46b83..2f1a823 100644 --- a/Reverse-Proxy.md +++ b/Reverse-Proxy.md @@ -1,3 +1,36 @@ +# Linux / OSX + +## Prerequisites + +- Install Nginx or Apache +- Optional: have an SSL certificate. A free one can be obtained using ["Let's Encrypt"](https://letsencrypt.org/) + +## Nginx Conf +Nginx is by far, easier to setup a reverse proxy. Depending on your distro, the location of the Nginx conf or access log may be different than what's shown below. Please use these as a guide. + +### HTTP (non-SSL) +Create a new config here: `/etc/nginx/sites-enabled/sonarr.your-domain.xyz` +With the following contents: + + server { + listen 80; + server_name sonarr.your-domain.xyz; + + location / { + proxy_pass http://127.0.0.1:8989; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_redirect off; + } + access_log /var/log/nginx/sonarr.your-domain.xyz; + } + +Reload Nginx: `nginx -s reload` + +# Windows + ## Variant 1: Setting the URL base in the UI 1. Go to Settings -> General @@ -8,4 +41,4 @@ ## Variant 2: Editing the configuration file 1. Open file ~/.config/NzbDrone/config.xml -2. Add entry `your/desired/path` \ No newline at end of file +2. Add entry `your/desired/path`