I'm running a Fedora 38 PC as a home server and want to set up a Plex Media Server. Nginx proxy manager is dockerized and Plex Media Server on bare metal.
What I did:
Opened ports 80 and 443 on my router and forwarded them to the server's internal IP.
Opened ports 80 and 443 on my Fedora PC's firewall.
Bought a Namecheap domain and added an A record with "plex" as the host and my server's external IP.
Set up an NGINX proxy for Plex with the following settings:
Domain name: plex.mydomain.com
IP: Fedora PC's internal IP
Scheme: http
Forwarded port: 32400
Enabled WebSockets and blocked common exploits
Requested a Let's Encrypt certificate, enabled force SSL, HTTP/2 Support, HSTS, and HSTS Subdomains.
NGINX Proxy Manager shows my proxy as active, with SSL enabled, and gives the impression that everything works. However, when trying to access Plex via https://plex.mydomain.com/, I get a "502 Bad Gateway" error (although the SSL certificate is valid), even though I added the URL in Plex as a custom URL. I can't even reach Plex locally via http://192.168.1.66:32400/ neither. Plex's settings show "Fully accessible outside your network" which I know shouldn't be the case since NGINX is handling remote access.
Weirdly, I can use Plex in the app, even outside my home network, with relay disabled.
I'm very confused as to why Plex works in the app but not via my domain. Here are my NGINX Proxy Manager logs (with domain and IPs replaced for privacy):
[20/Jun/2023:06:49:38` +0000] - - 502 - GET https plex.mydomain.lol "/" [Client 192.168.0.1] [Length 556] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (X11; U; Linux armv7l; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16" "-"
"[20/Jun/2023:06:50:46 +0000] - - 301 - GET http plex.mydomain.lol "/" [Client 192.168.0.2] [Length 166] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36" "-"
"[20/Jun/2023:06:50:46 +0000] - - 502 - GET https plex.mydomain.lol "/" [Client 192.168.0.2] [Length 556] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36" "-"
"[20/Jun/2023:06:50:56 +0000] - - 301 - GET http plex.mydomain.lol "/" [Client 192.168.0.3] [Length 166] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" "-"
"[20/Jun/2023:06:55:37 +0000] - - 502 - GET https plex.mydomain.lol "/" [Client 192.168.0.4] [Length 556] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" "-"
"[20/Jun/2023:06:55:40 +0000] - - 301 - GET http plex.mydomain.lol "/" [Client 192.168.0.4] [Length 166] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" "-"
"[20/Jun/2023:06:55:40 +0000] - - 502 - GET https plex.mydomain.lol "/" [Client 192.168.0.4] [Length 556] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" "-"
"[20/Jun/2023:06:59:09 +0000] - - 502 - GET https plex.mydomain.lol "/" [Client 192.168.0.4] [Length 556] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" "-"
"[20/Jun/2023:07:00:02 +0000] - - 502 - GET https plex.mydomain.lol "/" [Client 192.168.0.5] [Length 154] [Gzip -] [Sent-to 192.168.1.66] "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
Hey everyone,
I need help with a perplexing issue:
I'm running a Fedora 38 PC as a home server and want to set up a Plex Media Server. Nginx proxy manager is dockerized and Plex Media Server on bare metal.
What I did:
Opened ports 80 and 443 on my router and forwarded them to the server's internal IP.
Opened ports 80 and 443 on my Fedora PC's firewall.
Bought a Namecheap domain and added an A record with "plex" as the host and my server's external IP.
Set up an NGINX proxy for Plex with the following settings:
Domain name: plex.mydomain.com
IP: Fedora PC's internal IP
Scheme: http
Forwarded port: 32400
Enabled WebSockets and blocked common exploits
Requested a Let's Encrypt certificate, enabled force SSL, HTTP/2 Support, HSTS, and HSTS Subdomains.
NGINX Proxy Manager shows my proxy as active, with SSL enabled, and gives the impression that everything works. However, when trying to access Plex via https://plex.mydomain.com/, I get a "502 Bad Gateway" error (although the SSL certificate is valid), even though I added the URL in Plex as a custom URL. I can't even reach Plex locally via http://192.168.1.66:32400/ neither. Plex's settings show "Fully accessible outside your network" which I know shouldn't be the case since NGINX is handling remote access.
Weirdly, I can use Plex in the app, even outside my home network, with relay disabled.
I'm very confused as to why Plex works in the app but not via my domain. Here are my NGINX Proxy Manager logs (with domain and IPs replaced for privacy):