NGINX config file for OMV webgui (using it with the linuxserver letsencrypt container)

    • OMV 4.x
    • Hey :)
      I´m trying this since days...
      It just t don´t work for me :/ I edited a proxy conf file to
      server {
      listen 443 ssl;
      #add_header Strict-Transport-Security "max-age=15552000" always;
      add_header Referrer-Policy no-referrer;
      add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
      #add_header X-Frame-Options SAMEORIGIN always;
      #add_header X-Content-Type-Options nosniff always;
      #add_header X-XSS-Protection "1; mode=block" always;

      root /config/www;
      index index.html index.htm index.php;

      server_name *;

      include /config/nginx/ssl.conf;

      client_max_body_size 0;

      location / {
      include /config/nginx/proxy.conf;
      proxy_redirect http:// https://;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      without luck. Always appears the startpage of nginx
      local no problems, but nothing changed for my domain.
      I also deleted the browser cache...really dont know what is wrong
      anybody can help, plz
    • im using the linuxserver/letsencrypt docker image to automatically generate ssl certificates and this also has nginx built in to act as the proxy to direct to the web request to the correct web admin page, i use this to gain outside access for omv, nextcloud, transmission and also homeassistant.

      are you truing to use the omv built in nginx?
    • what I have done so far is setting up new omv
      doing all updates
      installing docker on omv extras
      setting up linuxserver/letsencrypt right to Technodads guide
      now I´m on point to install the generated certificate by importing the certificate from lets=>etc=>letsencrypt=>live=>mydomain=>privkey.pem and cert.pem
      to omv webgui=>certifikates=>ssl=>import ssl certficate private key and certivicate is that right to this point?
    • Try this conf for omv gui.

      Source Code: omv.subdomain.conf

      1. server {
      2. listen 443 ssl;
      3. listen [::]:443 ssl;
      4. # enter the subdomain in the next line ahead of the '.*;', which you specified in your letsencrypt container for this purpose
      5. server_name omv.*;
      6. # uncomment the next line to ask search-engines like google not to list your site in their search results (you can also add this line in your default site-co$
      7. #add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
      8. include /config/nginx/ssl.conf;
      9. client_max_body_size 0;
      10. location / {
      11. include /config/nginx/proxy.conf;
      12. resolver valid=30s;
      13. # enter the ip of your OMV-Gui in the next line
      14. proxy_pass;
      15. }
      16. }
      Display All
    • I have attempted to do the same I have the LetsEncrypt docker container running with a reverse proxy setup to point back to the OMV webgui on the host machine.

      It nearly works in the access log I can see all the java script being returned but in the source of the webpage returned I see a header of 404 though nothing renders on the page.

      My setup

      Duckdns -> 443 on my router -> 443 LetsEncrypt container -> 8080 on OMV host

      So to call i use

      Anyone tried this?

      here is my proxy conf


      1. #omv base proxy
      2. location /omv {
      3. include /config/nginx/proxy.conf;
      4. resolver valid=30s;
      5. proxy_pass;
      6. }
    • I got it working so I thought I would post the nginx proxy configuration in case anyone else is trying to do the same.


      1. location /omv {
      2. return 301 $scheme://$host/omv/;
      3. }
      4. location ^~ /omv/ {
      5. include /config/nginx/proxy.conf;
      6. resolver valid=30s;
      7. set $upstream_omv omv;
      8. rewrite /omv(.*) $1 break;
      9. proxy_pass;
      10. }
      Display All
    • gromgsxr wrote:

      Source Code

      1. server {
      2. listen 443 ssl;
      3. #add_header Strict-Transport-Security "max-age=15552000" always;
      4. add_header Referrer-Policy no-referrer;
      5. add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
      6. #add_header X-Frame-Options SAMEORIGIN always;
      7. #add_header X-Content-Type-Options nosniff always;
      8. #add_header X-XSS-Protection "1; mode=block" always;
      9. root /config/www;
      10. index index.html index.htm index.php;
      11. server_name;
      12. include /config/nginx/ssl.conf;
      13. client_max_body_size 0;
      14. location / {
      15. include /config/nginx/proxy.conf;
      16. proxy_redirect http:// https://;
      17. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      18. proxy_set_header Upgrade $http_upgrade;
      19. proxy_set_header Connection "upgrade";
      20. proxy_pass http://you ip:80;
      21. }
      22. }
      Display All
      ok try that just change the domain on line 14 and the correct ip on line 26 that should work i think
      Basically I am using this for my login from outside, it does work for few hours but after a while I am getting no login box until I stopped and restart letsencrypt docker actually I made a thread there OMV from outside no login box but I think maybe I can get a solution here.
      • 2019-07-05_002447.jpg

        28.65 kB, 1,054×631, viewed 80 times