'Plex behind nginx reverse proxy with get requests to different route
I am trying to link all the services on my network together with nginx. One of those services is Plex. The nginx server is running inside docker on 192.168.1.150:80. The plex server is running on 192.168.1.149:32400. I also have a homer instance running on 192.168.1.148:80 I have a working config (see below), but I want to change something that I do not know how.
Nginx.conf:
user nginx;
worker_processes 5;
events {
worker_connections 2048;
}
http {
server {
location / {
proxy_pass http://192.168.1.148:80;
}
location /plex {
proxy_pass http://192.168.1.149:32400/web;
}
location /web {
proxy_pass http://192.168.1.149:32400/web;
}
}
}
As you can see, because plex requests resources from subdomain '/web', I have to add the proxy_pass for /web to go to plex as well. This is far from ideal when I want to use the subdomain /web for something else. The plex's index.html requests some script from /web/.... Is there some way to have this request go to /plex/web, so that I can catch it in that subdomain and not in the global one. This way I can use /web for something else.
Thanks in advance ExellentCoin
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|