Hi,
I recently installed OMV 4.x (after running 2.x for a few years) on my NAS-box from scratch. I installed the Docker plugin and pulled several images (SabNZBd, Transmission, Sonarr, Radarr and Plex).
For each Docker container I created a reverse proxy, using e.g. [url='https://nas.mydomain.com/sonarr`']https://nas.mydomain.com/sonarr[/url]. This is working fine.
The only way I managed to reach Plex through a reverse proxy was by using a subdomain, e.g. [url]https://plex.mydomain.com[/url]. This seemed to work fine (it worked fine on OMV 2.x), but today I noticed that my openmediavault logs are stuffed with nginx reboots. Every 30 seconds, like clockwork.
After a bit of research (digging through docker container logs, turning each of them on and off, etc.) I found out, that when I disable the Reverse Proxy for Plex, Nginx runs fine.
In short, I hope anyone here can help me out.
This is my /etc/nginx/sites-enabled/openmediavault-plex (which is a symlink to /etc/nginx/sites-available/openmediavault-plex
server {
listen 443;
server_name openmediavault-plex;
rewrite https://$host$request_uri? permanent;
error_log /var/log/nginx/openmediavault-plex_error.log error;
access_log /var/log/nginx/openmediavault-plex_access.log combined;
ssl on;
# These are the paths to your generated Let's Encrypt SSL certificates.
ssl_certificate /etc/ssl/certs/openmediavault-c5ed6413-1688-480b-8d84-ef365bcd9c18.crt;
ssl_certificate_key /etc/ssl/private/openmediavault-c5ed6413-1688-480b-8d84-ef365bcd9c18.key;
# To generate your dhparam.pem file, run `openssl dhparam -out /etc/nginx/dhparam.pem 2048` (without the quotes) in your terminal.
ssl_dhparam /etc/nginx/dhparam.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:60m;
location / {
# IP address of Plex Media Server
proxy_pass http://localhost:32400;
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_cookie_path /web/ /;
access_log off;
}
}
Alles anzeigen
Most of this comes from tutorials found on the web, and I just played around with it till I got it to work. So I'm not much a Nginx wizz.
Thanks in advance!
Edit: Just found this recurring error in the logs: monit[19065]: 'nginx' failed protocol test [HTTP] at [127.0.0.1]:443 [TCP/IP SSL] -- HTTP error: Server returned status 401. So I checked /etc/monit/conf.d/openmediavault-nginx.conf:
if failed host 127.0.0.1 port 443 type tcpssl protocol http timeout 15 seconds for 2 times within 3 cycles then restart
15 seconds for 2 times = 30 seconds. So I guess it's monit which restarts nginx continuously, because Monit isn't authorized (the 401 status) or something? If someone could explain the meaning of the error generated by monit, I'd probably be able to solve it.