nginx in conflict with webgui

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • nginx in conflict with omv3 webgui

      I am rebuilding (manually) an omv 1.x host in omv 3.x

      on the 1.x host I had nginx installed to proxy requests to different services.

      the config (in 1.x) looks like this:

      Source Code

      1. server {
      2. listen [::]:443 ssl;
      3. server_name sub.domain.com;
      4. index index.html;
      5. access_log /var/log/nginx/6a9d3536-4ab8-4a3b-aed8-4387787873a9-access.log;
      6. error_log /var/log/nginx/6a9d3536-4ab8-4a3b-aed8-4387787873a9-error.log;
      7. large_client_header_buffers 4 8k;
      8. location / {
      9. proxy_pass http://localhost:8083;
      10. proxy_http_version 1.1;
      11. proxy_set_header Upgrade $http_upgrade;
      12. proxy_set_header Connection 'upgrade';
      13. proxy_set_header Host $host;
      14. proxy_cache_bypass $http_upgrade;
      15. client_max_body_size 200M;
      16. }
      17. }
      Display All


      the similar config in omv 3.x here doesn't work, as nginx doesn't come up with "address already in use". I wonder why?


      Source Code

      1. server {
      2. listen 443 ssl;
      3. listen [::]:443 ssl;
      4. server_name sub.domain.com;
      5. index index.html;
      6. access_log /var/log/nginx/521a0317-12ef-40dd-8c9a-f707c82f96af-access.log;
      7. error_log /var/log/nginx/521a0317-12ef-40dd-8c9a-f707c82f96af-error.log;
      8. large_client_header_buffers 4 8k;
      9. location / {
      10. proxy_pass http://localhost:9000;
      11. proxy_http_version 1.1;
      12. proxy_set_header Upgrade $http_upgrade;
      13. proxy_set_header Connection 'upgrade';
      14. proxy_set_header Host $host;
      15. proxy_cache_bypass $http_upgrade;
      16. }
      17. }
      Display All
    • ok, the problem seems to be, that the nginx plugin produces this code in the zzz-omv-nginx config:


      Source Code

      1. listen 443 ssl;
      2. listen [::]:443 ssl;
      Why this isn't working is explained here. I wonder if this is a bug in the nginx plugin or a conflict with an OMV3 configuration? right now, after creating the proxy I need to manually edit /etc/nginx/sites-enabled/zzz-omv-nginx to get nginx up..
    • This is indeed a fix that needs the plugin. I have several local hosts using the plugin and I had to delete all the listen 80; directives manually.

      Cc @ryecoaaron

      This is something that changed across nginx versions pretty sure this was working before in omv3
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • subzero79 wrote:

      This is something that changed across nginx versions pretty sure this was working before in omv3
      This definitely works on OMV3. It isn't a hard change for the plugin. I will try to get that out today.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • I pushed out 4.0.1 to OMV 4.x repo.

      I just reread the posts and is problem happening on an OMV 3.x system? I know it isn't broken on my OMV 3.x system. Maybe nginx from backports is being used?
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • perler wrote:

      what I read skimming over my link inin post #2 it could be more of a networking problem in general which triggers this behaviour in nginx.
      I will try these changes on my OMV 3.x system later today to see if it works. If it does, I wish push the changes to OMV 3.x.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • perler wrote:

      btw.. the creation of nginx reverse proxy websites is a bit tiresome, in the light of docker and a lot of services where we need these kind of proxies, maybe you can create an interface shortcut for creating a proxy or just filling in the usual options for it?
      If you are using docker already, move the OMV web interface to a different port and use one of the nginx proxy dockers to create your proxy. It is much easier.
      omv 4.1.6 arrakis | 64 bit | 4.16 backports kernel | omvextrasorg 4.1.7
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!