use of nginx
Posts: 27
Threads: 7
Joined: Oct 2015
Reputation:
0
[Not Solved]
Nov 08, 2015, 01:25 AM
Hey all,
I need to port forward, using my ddns - I finally figured out how to setup openSSH in a new router given to me my buddy.
So I needed to figure out how to access my HTPC programs through the new router.
I've gone through the nginx reverse proxy setup for NZBget, Sickrage and Transmission.
Sickrage and Transmission work perfectly (based on the guides) - yet NZBget [after an hour] still shows 502 Bad Gateway.
Just to note, the following lines of code give errors in the NZBget and Transmission guide...
Code:
[code]sudo unlink /etc/nginx/sites-enabled/default
unlink: cannot unlink ‘/etc/nginx/sites-enabled/default’: No such file or directory
~
~
sudo ln -s /etc/nginx/sites-available/reverse /etc/nginx/sites-enabled/reverse[/font]
ln: failed to create symbolic link ‘/etc/nginx/sites-enabled/reverse’: File exists
Any thoughts?[/code]
Posts: 27
Threads: 7
Joined: Oct 2015
Reputation:
0
[Not Solved]
Nov 10, 2015, 02:51 PM
(This post was last modified: Nov 10, 2015, 03:30 PM by mdbosworth .)
I have determined how to fix these errors. First off, I had to reset dependencies for nzbget, and then reinstall nginx. With that, I had to set port forwarding in my router settings, to allow ssh, webmin, port 80 and the rest of the HTPC programs through. Right now, only nzbget is on the reverse proxy. I'm having no problems with the others, why change what works.
Also, just to note - in order to use FailureLink.py - ffmpeg (and its dependicies) needs to be installed to work
here's the link i used to install ffmpeg on Ubuntu 15.10
http://www.unixmen.com/practical-guide-ffmpeg-part-1/
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Nov 10, 2015, 04:28 PM
That's my fault, I should have mentioned in each reverse proxy guide that once you have unlinked the default site and created the reverse nginx vhost, it is not required again. You just add new locations to the existing reverse virtual host.
Once I fix the main site I wil update the NZBGet Failurelink guide to include ffmpeg, thank you for pointing that out.
You are welcome to show your NZBGet settings and nginx reverse vhost, NZBGet does not allow custom locations so it must be /nzbget and point to to the non-https port for NZBGet.
Posts: 27
Threads: 7
Joined: Oct 2015
Reputation:
0
[Not Solved]
Nov 10, 2015, 04:49 PM
FailureLink settings attached
current vhost
Code:
server {
listen 80;
server_name pegasusserver.mynetgear.com, 192.168.1.5;
location /nzbget {
proxy_pass http://127.0.0.1:6789;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Going to populate it for Sickrage, Transmission and Couchpotato today...
Still having trouble with Plex behind the router. I've port forwarded 32400, but I think I may have to use apache.
Attached Files
Thumbnail(s)
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Nov 10, 2015, 05:04 PM
NZBGet should work with those settings.
For Plex you have to use location /web and then localhost:32400 for the proxy pass line
Posts: 27
Threads: 7
Joined: Oct 2015
Reputation:
0
[Not Solved]
Nov 10, 2015, 05:07 PM
(This post was last modified: Nov 10, 2015, 05:28 PM by mdbosworth .)
Ok I've added couchpotato, transmission and sickrage - but only transmission works...
Couchpotato and sickrage go to nginx Welcome page...
Code:
server {
listen 80;
server_name pegasusserver.mynetgear.com, 192.168.1.5;
location /nzbget {
proxy_pass http://127.0.0.1:6789;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /transmission {
proxy_pass http://127.0.0.1:9091;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /sickrage {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /couchpotato {
proxy_pass http://127.0.0.1:5050;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
I tried appending proxy_pass for sickrage to :8081/home - but that just sent me to a text only webpage
any thoughts?
SMH!!!
Duh, had to edit the WebUI and .ini proxy settings - so dumb sometimes...got them all working other than plex.
I'll post my solution
Posts: 201
Threads: 30
Joined: Aug 2015
Reputation:
7
[Not Solved]
Jan 20, 2016, 10:56 AM
plex works fine with nginx - i'm using it myself.
Code:
location /web {
proxy_pass http://127.0.0.1:32400/web;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Recent Posts
About Swap
jonescelinaa Apr 10, 2024, 06:58 AM
Tracker Status: Error Connection Time Out
jonesPhedra Apr 04, 2024, 08:17 AM
Split Tunnel Docker Containers
jonesPhedra Mar 27, 2024, 03:10 AM
Plex server not powerful enough, but only with s...
jonesPhedra Mar 27, 2024, 03:02 AM
game Geometry Dash Scratch
jonescelinaa Jan 31, 2024, 04:21 AM
Latest unread posts | Unanswered posts