plexpy with reverse proxy / split vpn
|
Posts: 19
Threads: 7
Joined: Jan 2017
Reputation:
0
[Not Solved]
Mar 02, 2017, 05:19 PM
I have deluge, sickrage, and even webmin working, but can't seem to get plexpy working.
I've uncommented the plexpy section in the sites-available/reverse config file in the nginx folder, and changed permissions and users to my vpn user for all of plexpy. I can see that plexpy's service is running. I just can't access the webui. It gives me ..
404 Not Found
The path '/plexpy' was not found.
Did I miss a setting somewhere?
Thanks!
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Mar 02, 2017, 05:32 PM
Can you share your reverse proxy virtual host file please?
Also the output of
Posts: 19
Threads: 7
Joined: Jan 2017
Reputation:
0
[Not Solved]
Mar 02, 2017, 07:20 PM
(Mar 02, 2017, 05:32 PM)Mike Wrote: Can you share your reverse proxy virtual host file please?
Also the output of
Here you go:
Code:
nevitt33@NAS:~$ sudo netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 27434/nginx: master
tcp 0 0 0.0.0.0:8112 0.0.0.0:* LISTEN 4040/python
tcp 0 0 0.0.0.0:32400 0.0.0.0:* LISTEN 3545/Plex Media Ser
tcp 0 0 127.0.0.1:32401 0.0.0.0:* LISTEN 3545/Plex Media Ser
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 3223/python
tcp 0 0 0.0.0.0:8181 0.0.0.0:* LISTEN 27503/python
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 3492/systemd-resolv
tcp 0 0 0.0.0.0:48662 0.0.0.0:* LISTEN 3501/transmission-d
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3720/sendmail: MTA:
tcp 0 0 0.0.0.0:5050 0.0.0.0:* LISTEN 4002/python
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 27434/nginx: master
tcp 0 0 0.0.0.0:37595 0.0.0.0:* LISTEN 3962/perl
tcp 0 0 0.0.0.0:64061 0.0.0.0:* LISTEN 4042/python
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 3305/smbd
tcp 0 0 0.0.0.0:58846 0.0.0.0:* LISTEN 4042/python
tcp 0 0 0.0.0.0:51332 0.0.0.0:* LISTEN 3501/transmission-d
tcp 0 0 0.0.0.0:46852 0.0.0.0:* LISTEN 3489/sshd
tcp 0 0 127.0.0.1:33669 0.0.0.0:* LISTEN 3822/Plex Plug-in [
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 3720/sendmail: MTA:
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 3492/systemd-resolv
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 3305/smbd
tcp6 0 0 :::80 :::* LISTEN 27434/nginx: master
tcp6 0 0 :::443 :::* LISTEN 27434/nginx: master
tcp6 0 0 :::64061 :::* LISTEN 4042/python
tcp6 0 0 :::445 :::* LISTEN 3305/smbd
tcp6 0 0 :::51332 :::* LISTEN 3501/transmission-d
tcp6 0 0 :::46852 :::* LISTEN 3489/sshd
tcp6 0 0 :::5355 :::* LISTEN 3492/systemd-resolv
tcp6 0 0 :::139 :::* LISTEN 3305/smbd
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Mar 02, 2017, 07:47 PM
Thanks, need the exact virtual host you are using too just to double check
Posts: 19
Threads: 7
Joined: Jan 2017
Reputation:
0
[Not Solved]
Mar 02, 2017, 07:59 PM
(This post was last modified: Mar 02, 2017, 08:04 PM by Thumper33.)
(Mar 02, 2017, 07:47 PM)Mike Wrote: Thanks, need the exact virtual host you are using too just to double check
I'm not sure what that means :/
it's hosted on the same box, so it's localhost.localdomain ... is that what you mean?
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Mar 02, 2017, 08:02 PM
No problem, I need to see the contents of /etc/nginx/sites-available/reverse or whatever your reverse proxy virtual host file is called
Posts: 19
Threads: 7
Joined: Jan 2017
Reputation:
0
[Not Solved]
Mar 02, 2017, 08:33 PM
(This post was last modified: Mar 02, 2017, 09:18 PM by Thumper33.)
let me know if this is a bad thing that have fully pasted here and I can mask some of it if necessary. Thanks... (and thanks for your help!)
Code:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name myservernameiscool.com 1.2.3.4;
return 301 https://$server_name$request_uri;
}
server {
# SSL configuration
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
include /etc/nginx/snippets/strong-ssl.conf;
ssl_certificate /etc/letsencrypt/live/nevitt33.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/nevitt33.com/privkey.pem;
error_log /var/log/nginx/nevitt33.com.error.log;
# Root location
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
# Basic Auth to protect the site
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
# Change the client side error pages (4xx) to prevent some information disclosure
error_page 401 403 404 /404.html;
# First attempt to serve request as file, then as directory,
# then fall back to displaying a 404.
location / {
try_files $uri $uri/ =404;
}
# Deny access to .htaccess files, if Apache's document
# root concurs with nginx's one
location ~ /\.ht {
deny all;
}
# Let's Encrypt Webroot plugin location -- allow access
location ~ /.well-known {
allow all;
}
# Location settings for reverse proxy; enable those you wish to use
# by removing the # from the section between the location line and the last }
#
# Transmission
# 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;
# }
#
# Deluge
location /deluge {
proxy_pass http://127.0.0.1:8112/;
proxy_set_header X-Deluge-Base "/deluge/";
include snippets/proxy-control.conf;
add_header X-Frame-Options SAMEORIGIN;
}
#
# NZBGet
# 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;
# }
#
# Sonarr
# location /sonarr {
# proxy_pass http://127.0.0.1:8989;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# }
#
# SickRage
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;
}
#
# CouchPotato
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;
}
#
# Webmin
location /webmin/ {
proxy_pass http://127.0.0.1:37595/;
proxy_redirect http://$host:37595/ /webmin/;
proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Madsonic
# location /madsonic {
# proxy_pass http://127.0.0.1:4040;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# }
#
# Headphones
# location /headphones {
# proxy_pass http://127.0.0.1:8181;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# }
#
# PlexPy
location /plexpy {
proxy_pass http://127.0.0.1:8181;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#
# Monit
# location /monit/ {
# rewrite ^/monit/(.*) /$1 break;
# proxy_ignore_client_abort on;
# proxy_pass https://127.0.0.1:2812;
# proxy_set_header Host $host;
# }
#
# HTPC Manager
# location /htpc {
# proxy_pass http://127.0.0.1:8085;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# }
}
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Not Solved]
Mar 02, 2017, 08:52 PM
Please update your post to remove the server_name line or replace the values with domain.com and 1.2.3.4
Posts: 19
Threads: 7
Joined: Jan 2017
Reputation:
0
[Not Solved]
Mar 02, 2017, 09:14 PM
(This post was last modified: Mar 02, 2017, 09:19 PM by Thumper33.)
(Mar 02, 2017, 08:52 PM)Mike Wrote: Please update your post to remove the server_name line or replace the values with domain.com and 1.2.3.4
done thanks.
I also decided to include the entire file in case something else might be wonkey with the other modules. Realized I didn't include some that aren't commented out originally. Anyway, there's the whole thing just in case.
Posts: 19
Threads: 7
Joined: Jan 2017
Reputation:
0
[Not Solved]
Mar 03, 2017, 01:32 PM
(This post was last modified: Mar 03, 2017, 01:35 PM by Thumper33.)
(Mar 02, 2017, 09:14 PM)Thumper33 Wrote: (Mar 02, 2017, 08:52 PM)Mike Wrote: Please update your post to remove the server_name line or replace the values with domain.com and 1.2.3.4
done thanks.
I also decided to include the entire file in case something else might be wonkey with the other modules. Realized I didn't include some that aren't commented out originally. Anyway, there's the whole thing just in case.
I fiddled with everything again last night for a few hours. I did finally get to the webui locally by commenting out the plexpy section from the reverse config and changing the user I'm launching plexpy with, so at least I can do that. I set everything up and then tried to change over to a remote setup by changing a few things in the settings for plexpy. I don't remember exactly everything I did, but I thought it made sense at the time. I know the main thing I changed was to add an http root as /plexpy. I think I changed the default HTTP Host from 0.0.0.0 to NAS (my localhost name). I may have also checked Enable HTTPS, but I don't recall for sure. Can you tell me how to set plexpy's web interface page to work with reverse proxy? Here is what it looks like:
-------------------------------------------------
THE DEFAULT WEB INTERFACE TAB IN PLEXPY WEBUI
HTTP Host
[0.0.0.0]
e.g. localhost or an IP, such as 0.0.0.0
HTTP Port
[8181]
Port to bind web server to. Note that ports below 1024 may require root.
HTTP Root
[ blank ]
The base URL of the web server. Used for reverse proxies.
Enable HTTP Proxy
[ ] (unchecked)
Respect the X-Forwarded-Proto header. Used for reverse proxies with SSL.
Launch Browser on Startup
[x] (checked)
Launch browser pointed to PlexPy on startup.
Enable HTTPS
[ ] (unchecked)
Enable HTTPS for web server for encrypted communication.
---------------------------------------------------
Here is what I would think I would need to do now that I can see the webui locally:
1.) HTTP Host - change to localhost or NAS
2.) HTTP Root - change to /plexpy
3.) Enable HTTP Proxy - check this box
4.) Enable HTTPS - check this box
5.) edit /etc/default/plexpy and change the user to VPN so it gets the split tunnel (do I really need to split tunnel plexpy, SR, CP plex etc?... things other than torrents)
6.) edit /etc/nginx/sites-available/reverse and uncomment the lines for plexpy
7.) navigate to mydomain.com/plexpy and it should be there
No?
|
|
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 |
|