-
Notifications
You must be signed in to change notification settings - Fork 81
Install SickGear [801] NGiNX
2023 May 28
Unsure if this advanced guide still works. Someone reported having an issue but didn't stick around in IRC. If you find an issue, please contribute a solution. If you find no issue, please let us know via an issue so that this notice can be deleted.
- In your server block, add the following location: Substitute the correct value for web_host, port, and web_root that is set in SickGear's config.ini
location /sickgear {
proxy_pass http://web_host:port/web_root;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log /var/log/nginx/sickgear.access.log; # optional; if not set, accesses will appear in the main NGiNX log
error_log /var/log/nginx/sickgear.error.log; # optional; if not set, errors will appear in the main NGiNX error log
}
-
Save the NGiNX config and restart NGiNX.
-
In your running SickGear instance,
- Enable the checkbox for General/Interface/Web Interface/Reverse proxy headers
- Shut down SickGear.
- Edit config.ini in your favorite editor and update the following lines:
-
web_host=0.0.0.0
# optional, you can also specify a specific IP from this box. All 0's allow SG to be reached from all IPs on this box -
web_root="sickgear"
# make sure this matches the suffix used in proxy_pass in your NGiNX config
-
Then update
web_root
in \autoProcessTV\autoProcessTV.cfg to match bothproxy_pass
in the NGiNX config andweb_root
in the config.ini -
Start SickGear back up and remember to access it with the new suffix!
Where SickGear previously ran on http://raspberrypi:8081
and NGiNX is on http://frontend
NGiNX config snippet:
location /sickgear {
proxy_pass http://raspberrypi:8081/mysickgear; # use the correct web_host, port, and web_root as set in SickGear's config.ini
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log /var/log/nginx/sickgear.access.log; # optional; if not set, accesses will appear in the main NGiNX log
error_log /var/log/nginx/sickgear.error.log; # optional; if not set, errors will appear in the main NGiNX error log
}
SickGear config.ini snippet:
web_host=0.0.0.0
web_root="mysickgear"
Now you access SickGear by using the URL http://frontend/sickgear
Contribution from barbequesauce.