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

    • OMV 4.x
    • NGINX config file for OMV webgui (using it with the linuxserver letsencrypt container)

      Hello everybody!

      Ik would like to get the OMV webgui behind my reverse proxy. I'am using the Linuxserver/letsencrypt container for my docker containers.
      Is there someone who want to share their config file for OMV. I've tried al lot of combinations, but i always get a "welcome"screen from NGINX.
      This is my last used config:

      server_name omv.*;


      include /config/nginx/ssl.conf;



      client_max_body_size 0;



      # enable for ldap auth, fill in ldap details in ldap.conf
      #include /config/nginx/ldap.conf;



      location / {
      # enable the next two lines for http auth
      #auth_basic "Restricted";
      #auth_basic_user_file /config/nginx/.htpasswd;



      # enable the next two lines for ldap auth
      #auth_request /auth;
      #error_page 401 =200 /login;



      include /config/nginx/proxy.conf;
      resolver 127.0.0.11 valid=30s;
      set $upstream_omv omv;
      proxy_pass 192.168.77.100:81;
      }
      }



      Thank you.
    • I am trying to accomplish the same thing. Thinking outside the box a little, would creating a symlink between the index files of the OMV nginx files with those in the letsencrypt nginx folder, and then deleting the active symlink in the OMV nginx folder do the trick? I would imagine we can't move the native OMV files to the letsencrypt docker thus maybe a symlink would be the answer.
    • no answer to this one? i came to the forums to ask the same thing. I have OMV setup and working. i have docker and the lets encrypt container working. i have a subdomain from duck dns working, but when i go to my subdomain at duckdns i get the welcome screen only to nginix. i am a ultra noob so i was hoping for some instructions here on what to do next
    • 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 omv domain name;
      12. include /config/nginx/ssl.conf;
      13. client_max_body_size 0;
      14. location / {
      15. # auth_basic "Restricted";
      16. # auth_basic_user_file /config/nginx/.htpasswd;
      17. include /config/nginx/proxy.conf;
      18. proxy_pass https://omv ip:443;
      19. }
      20. }
      Display All
      thats what i use with the Linuxserver/letsencrypt docker container
    • thanks. i added that conf file and restarted the container. i still cannot access OMV but i am not getting the welcome to nginx screen. now i am getting a page cannot be found. i see this in the letsencrypt logs:

      nginx: [emerg] invalid number of arguments in "proxy_pass" directive in /config/nginx/proxy-confs/OMV.subdomain.conf:23
    • gromgsxr wrote:

      are you redirecting to the http port 80 or https port 443 on omv, do you acces it by http or https on your local network
      when i am on my home LAN i access it via "http" and by the local IP address. i followed the instructions for setting up the letsencrypt docker by technodadlife and redirected ports 443 to 450 and 80 to 90 just like in the video. and after i was all done was able to get the welcome to nginx page. now following all the directions above i am now getting the 502 bad gateway. and i have attached a screenshot of my OMV general settings page
      Images
      • OMV general settings.PNG

        8.57 kB, 731×309, viewed 125 times
    • 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 yourdomain.org;
      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
    • 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 yourdomain.org;
      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
      i made the changes already that you suggested the first time and that got me to the 502 bad gateway. i took a screenshot of the conf file and blacked out my subdomain name and the internal IP address of the server
      Images
      • OMV conf settings.PNG

        21.76 kB, 709×420, viewed 251 times
    • Thanks @gromgsxr for the info. Do you know how to get it working when OMV is working with another http port. Mine is running at port 81. That's because my proxy is running at 80 and 443. This is my config file:

      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";
      proxy_pass http://*:81;
      }
      }

      I've replaced the domain and ip with a wildcard for privacy.
    • NGINX config file for OMV webgui (using it with the linuxserver letsencrypt container)

      akruidenberg wrote:

      Hello everybody!

      Ik would like to get the OMV webgui behind my reverse proxy. I'am using the Linuxserver/letsencrypt container for my docker containers.
      Is there someone who want to share their config file for OMV. I've tried al lot of combinations, but i always get a "welcome"screen from NGINX.
      This is my last used config:

      server_name omv.*;


      include /config/nginx/ssl.conf;



      client_max_body_size 0;



      # enable for ldap auth, fill in ldap details in ldap.conf
      #include /config/nginx/ldap.conf;



      location / {
      # enable the next two lines for http auth
      #auth_basic "Restricted";
      #auth_basic_user_file /config/nginx/.htpasswd;



      # enable the next two lines for ldap auth
      #auth_request /auth;
      #error_page 401 =200 /login;



      include /config/nginx/proxy.conf;
      resolver 127.0.0.11 valid=30s;
      set $upstream_omv omv;
      proxy_pass 192.168.77.100:81;
      }
      }



      Thank you.
      Hi guys, I'm trying to do the same and it appears that the method to configure this is the same as how I would configure a reverse proxy for applications like Sonarr and Radarr using the letsencrypt container (the reverse proxies for these applications are working fine for me). But for the OMV webgui itself, where do I find the OMV webgui config file? I don't see it under the letsencrypt config folder with the sample proxy-confs files.

      Thanks!

      Sent from my SM-N920I using Tapatalk
    • Morlan wrote:

      There is none. You can do it yourself by copying and renaming an existing .conf file. The name does not matter.
      You can use the file in the quote above.
      Delete set $upstream_omv omv;
      Change proxy_pass http://youromvip:youromvport
      Thanks. Where do I place the .conf file? If the name does not matter, how does the OMV webgui know that it is supposed to "look" at this .conf file?
    • Morlan wrote:

      You pass the file in the config folder of your letsencrypt docker in the subfolders /nginx/proxy-confs/.

      verk47 wrote:

      TIf the name does not matter, how does the OMV webgui know that it is supposed to "look" at this .conf file?
      The gui does not "look". The reverse proxy (nginx) in the letsencrypt container redirects the request to the omv gui through the.conf file
      Thanks I just got it to work!