Plex with reverse Proxy running on another Raspberry pi
|
Posts: 12
Threads: 3
Joined: Dec 2015
Reputation:
2
[Not Solved]
Apr 05, 2016, 02:28 PM
Hi,
I have tried to follow these instructions http://www.htpcguides.com/configure-plex...inx-linux/
However my setup is slightly different, and there are some reasons for it.
I have one Raspberry Pi with Nginx on it which is on IP 10.10.10.10
It listens to the port 80 whilst the Router translates the A different port to 80 for the outside world.
I have Plex running on a Raspberry Pi2 with IP 10.10.10.30:32500/web
yes I have used port 32500 for it!
When I use the above instructions I get a Bad Gateway error. Is there anybody who would have a cool suggestion on how to get it to work ?
Many thanks in advance !
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Apr 05, 2016, 02:33 PM
Try this
Code:
server {
listen 80;
server_name htpcguides.crabdance.com 10.10.10.10;
location /web {
proxy_pass http://10.10.10.30:32500;
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 /plex {
proxy_pass http://127.0.0.1/web;
}
}
Posts: 12
Threads: 3
Joined: Dec 2015
Reputation:
2
[Not Solved]
Apr 05, 2016, 02:48 PM
(This post was last modified: Apr 05, 2016, 02:58 PM by spanishu.)
(Apr 05, 2016, 02:33 PM)Mike Wrote: Try this
Code:
server {
listen 80;
server_name htpcguides.crabdance.com 10.10.10.10;
location /web {
proxy_pass http://10.10.10.30:32500;
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 /plex {
proxy_pass http://127.0.0.1/web;
}
}
Just tried and still get bad gateway. This is what I am getting in the error Log
2016/04/05 16:55:31 [error] 8325#0: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: xxx.xxx.me, request: "GET /web HTTP/1.0", upstream: "http://10.10.10.30:32500/web", host: "127.0.0.1"
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Apr 05, 2016, 03:14 PM
Can you show the output from netstat -lntp on your .30 Pi?
Posts: 12
Threads: 3
Joined: Dec 2015
Reputation:
2
[Not Solved]
Apr 05, 2016, 03:33 PM
(This post was last modified: Apr 05, 2016, 05:50 PM by Mike.
Edit Reason: formatting
)
(Apr 05, 2016, 03:14 PM)Mike Wrote: Can you show the output from netstat -lntp on your .30 Pi?
Code:
Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:52549 0.0.0.0:* LISTEN 2407/Plex Plug-in [
tcp 0 0 0.0.0.0:32400 0.0.0.0:* LISTEN 2149/Plex Media Ser
tcp 0 0 127.0.0.1:32401 0.0.0.0:* LISTEN 2149/Plex Media Ser
tcp 0 0 127.0.0.1:52500 0.0.0.0:* LISTEN 2493/Plex Plug-in [
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
There is obviously a problem since I have configured it at 32500 but it is really listening at 32400. Will do some more test now.
It got me further. I can now effectively get to plex from the outside with reverse proxy. However it does not yet fully functional work.
It Shows me the plex screen but then says that the server is unavailable.
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Apr 05, 2016, 05:49 PM
Did you set Plex to not check security for certain IP ranges?
Make sure to try /web first.
btw you can use the blue arrows icon to wrap text in code blocks
Posts: 12
Threads: 3
Joined: Dec 2015
Reputation:
2
[Not Solved]
Apr 05, 2016, 06:14 PM
(This post was last modified: Apr 05, 2016, 06:26 PM by spanishu.)
(Apr 05, 2016, 05:49 PM)Mike Wrote: Did you set Plex to not check security for certain IP ranges?
Make sure to try /web first.
btw you can use the blue arrows icon to wrap text in code blocks
I have tried with /web and the same result.
I have not set any check for IP ranges, can happily do
An additional thought. In order to get to my reverse proxy from the internet I enter my.proxy.me:32500/web
The plex settings are now on :32400
32500 is the port on which my router does the NAT conversion to port 80 on the nginx.
On the Plex Server Settings I have entered http://my.proxy.me:32500
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Apr 05, 2016, 06:44 PM
Under Settings -> Server -> Network click Show advanced
Enter your dynamic dns address without port in Custom server access URLs
For List of networks that are allowed without auth enter 10.10.0.0/16 or you can be more restrictive with 10.10.10.0/24
Save and restart Plex
If there are still issues (maybe because of NAT) then turn put port_in_redirect off; in the server block of the nginx virtual host, restart nginx.
Posts: 12
Threads: 3
Joined: Dec 2015
Reputation:
2
[Not Solved]
Apr 05, 2016, 07:18 PM
(Apr 05, 2016, 06:44 PM)Mike Wrote: Under Settings -> Server -> Network click Show advanced
Enter your dynamic dns address without port in Custom server access URLs
For List of networks that are allowed without auth enter 10.10.0.0/16 or you can be more restrictive with 10.10.10.0/24
Save and restart Plex
If there are still issues (maybe because of NAT) then turn put port_in_redirect off; in the server block of the nginx virtual host, restart nginx.
I made the suggested changes on plex and restarted. ---> no change
I have added the port_in_redirect off; into the server { block ---> no change
I have removed it from there and put it into the /web block ---> no change
if you like I send you a pm with the domain and you can have a look ?
Posts: 12
Threads: 3
Joined: Dec 2015
Reputation:
2
[Not Solved]
Apr 07, 2016, 07:04 AM
(Apr 05, 2016, 07:18 PM)spanishu Wrote: (Apr 05, 2016, 06:44 PM)Mike Wrote: Under Settings -> Server -> Network click Show advanced
Enter your dynamic dns address without port in Custom server access URLs
For List of networks that are allowed without auth enter 10.10.0.0/16 or you can be more restrictive with 10.10.10.0/24
Save and restart Plex
If there are still issues (maybe because of NAT) then turn put port_in_redirect off; in the server block of the nginx virtual host, restart nginx.
I made the suggested changes on plex and restarted. ---> no change
I have added the port_in_redirect off; into the server { block ---> no change
I have removed it from there and put it into the /web block ---> no change
if you like I send you a pm with the domain and you can have a look ?
Any feedback. I feel being more than halfway there and would really love to make the last mile. Many thanks !
|
|
Recent Posts
|
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
|
About Swap
jonescelinaa Mar 18, 2024, 02:11 AM
|
game Geometry Dash Scratch
jonescelinaa Jan 31, 2024, 04:21 AM
|
Find My IP Address - Kodi - Updated
jonesPhedra Jan 29, 2024, 02:56 AM
|
Latest unread posts | Unanswered posts |
|