OMV6 not missing nginx-plugin anymore, since

  • I spent some time to understand nginx.

    try https://www.keycdn.com/support/nginx-location-directive or https://nginx.org/en/docs/http/ngx_http_core_module.html#location and more ...
    My first post, my background: After a long period w/o GNU/Linux, since I stopped using fli4l/eisfair, I restarted several months ago with OMV6/Debian11, hardware details below, and clients with LMDE. After organizing my backup strategy for the NAS-data with handmade cronjobs and rsync-scripts, I am happy with the basics and this project. To say thanks, I write a bit after experiencing nginx@OMV6, to make it easier for others to get started and suffer directly :):) .
    Additionally my NAS shall do monitoring (only local/LAN/WiFi) with munin, which uses http:80, like OMV6 does. My experience with LAMP is decades ago and vanished. A good opportunity to deal with nginx as local (minimum set_header) reverse-proxy (**ports**, **sub/domains**, **different paths**). I red threads a lot, here and there. Below aAt the end you find the reasonable background for OMV6. Start with "long story short":

    nginx @ OMV6 to "manage several virtual hosts" on the same port:80, yet different to OMV6port:70

    1. Preliminary:
      • Be aware what you are doing, as always :) when you are familiar with CLI.
      • You may kick yourself out off the webGUI and more important, you touch the security of OMV6.
      • YES, I tried to handle OMV6port:80 too, but I decided, NOT to deal with it (yet):


        Code
        omv-env set OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS "   " # only necessary if OMV6port:80
        omv-env get OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS
        OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS='   '        # an empty string resp. three blanks
        The adding 'default_server' (i.e. see no.2) option into OMV/nginx ```/etc/nginx/sites-available/openmediavault-webgui``` is disabled by setting env variable with an empty (resp. three blanks) string. Yes, ALL hosts at port:80 worked. But the rrd-data logging/display in the OMV-webgui stopped during this config active. Data logging started again after reboot resp. reset the graph-data resp. rrd-files. If you are in doubt, go without. I wanted a working solution fast, to proceed with munin. May be I come back later for more testing ALL@port:80.
    2. start with a check of OMV6/nginx configuration with ```cat``` or ```tail -5 /etc/nginx/sites-available/openmediavault-webgui```
      Code
      # This file is auto-generated by openmediavault (https://www.openmediavault.org)
      # WARNING: Do not edit this file, your changes will get lost.
      ...
          }
          listen *:80 default_server;
          listen [::]:80 default_server;
          include /etc/nginx/openmediavault-webgui.d/*.conf;
      }
    3. in webGUI-menue: System-Workbench change http:80 to http:70 i.e. if needed SSL/TLS httpS:443 to httpS:??? (not yet in trusted LAN)
    4. proof the change ```ls -al /etc/nginx/sites-available/openmediavault-webgui``` ```tail -5 /etc/nginx/sites-available/openmediavault-webgui```
      Code
          }
          listen *:70 default_server;
          listen [::]:70 default_server;
          include /etc/nginx/openmediavault-webgui.d/*.conf;
      }
      and test the login on the new port:70 ```http://IP.v4.Add.ress:70/``` worked. I changed ```/etc/hostname```, the standard ```http://openmediavault:70/``` can not work, ```but http://nas.local:70``` did.
    5. in my example the directories at nginx-data location are
      Code
      ls -al /var/www
      drwxr-xr-x  5 root      root      .
      drwxr-xr-x 12 root      root      ..
      drwxr-xr-x  2 root      root      html
      drwxr-xr-x  4 munin     munin     munin
      drwxr-xr-x  5 op...gui  op...gui  openmediavault
      lrwxrwxrwx  1 root      root      web -> /srv/dev-disk.../web
      -rw-r-xr-x  1 root      root      index.html
    6. create ```/etc/nginx/sites-available/80-vhosts``` as additional config file
    7. create a relative symlink for the additional nginx-config file to ```sites-enabled```


      Code
        cd /etc/nginx/sites-enabled
        ln -s ../sites-available/80-vhosts  .
    8. let nginx check the config ```nginx -t``` and re/load it ```nginx -s reload```
    9. try the vhosts, don't forget to clear browser cache and check the ```nginx/error.log``` parallel, ```tail -10 /var/log/nginx/error.log```
    10. if some vhosts work, others not, faults outside this config are possible, like file access rights. For processing dirs/files.html nginx needs permission rw-r-xr-x, try ```chmod -R 755 / 644```. Go back to 1., simplify, be patient and good luck.

    background: nginx-plugin and OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS

    OMV5 - Problem with nginx activating multiple virtual hosts due to missing "default_server" #620
    #620 24 Feb 2020 That is why I tell people to NOT put the OMV nginx instance on the internet.
    #848 13 Nov 2020
    https://chrisjean.com/fix-ngin…8-address-already-in-use/
    #1189 20 Jan 2022
    ^~ https://serverfault.com/questi…n-an-nginx-location-block

    OMV6 nutzt den nginx-webserver ohne plugin, weil manche Anwender damit (große) Schwierigkeiten erlebten. Die Erreichbarkeit weiterer Seiten auf port:80 muss manuell eingerichtet werden. catch-all server block only once per port in the whole config @ /etc/nginx/sites-enabled Now solved with: Add environment variable OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS since

    Code
    openmediavault (6.0.9-5) unstable; urgency=low
    * Issue #1189: Add environment variable OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS
        to be able to customize the nginx listen directive.
    -- Volker Theile < @ openmediavault.org> Wed, 12 Jan 2022 19:53:08 +0100
    You can disable adding 'default_server' option by 
    setting env variable with an empty string resp. three blanks:
    
    omv-env set OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS "   " # only necessary if OMV6port:80
    omv-env get OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS
    OMV_NGINX_SITE_WEBGUI_LISTEN_PARAMS='   '        # an empty string resp. three blanks

    https://www.keycdn.com/support/nginx-location-directive
    https://nginx.org/en/docs/http…core_module.html#location

    OMV6 on HDD, 2,4GHz-Core2Duo 4GB, MegaRAID-controller for data availability

    250GB SSD/Raid1 2TB HDD/Raid1 plus 2,2TB HDD for data backup

    • Official Post

    It would be much easier to just use nginx and swag in docker.

    omv 7.5.0-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.15 | compose 7.3.2 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • easier for whom?

    Of course I red the many posts here about Docker. But without any docker knowledge yet, this way was easier for me. Now you have a recipie, try the other way :) .

    Unluckily in German, but in this post https://decatec.de/home-server…-auf-einem-server-hosten/ I found my opinion about docker in the comment of ```OLI 28. JULI 2022 UM 15:29``` and the reply of the page-owner ```JAN 28. JULI 2022 UM 16:17``` perfect summarized.
    There will come the time for me, to test anything. Then I'll get in touch with Docker, promised :) . Thanks for your reply.

    OMV6 on HDD, 2,4GHz-Core2Duo 4GB, MegaRAID-controller for data availability

    250GB SSD/Raid1 2TB HDD/Raid1 plus 2,2TB HDD for data backup

    • Official Post

    easier for whom?

    Based on the number of docker tutorials on the internet vs the number of tutorials on modifying OMV's nginx config, I would say docker wins easily.


    Now you have a recipie, try the other way

    I was the maintainer of the nginx plugin. I know nginx well. I will still tell people to use docker because there is too big of a chance that they will break OMV's nginx config doing it your way.

    But without any docker knowledge yet, this way was easier for me.

    You really don't need docker knowledge.

    1. Install the openmediavault-compose plugin
    2. From the Files tab, click Add from Example
    3. Select nginx
    4. Enter a name and click Save
    5. Edit the new File and update the port and path to pages
    6. Save and Apply
    7. Click the Up button
    8. Browse hostname:port

    omv 7.5.0-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.15 | compose 7.3.2 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I was the maintainer of the nginx plugin. I know nginx well.


    I didn't mean to be disrespectful to the maintainer of the nginx-plugin. Obviously you are not the addressee of my post. Forgiveness. Nevertheless, I feel honored by your answer, as it shows that I have described things correctly. In the end it's all about know-how. There is no argument against it. When I delved into the topic, it quickly became clear that there would be no nginx-plugin for OMV6. I did my challenge and learned a lot in the process. Nowhere near your level and able to provide support to others.

    there is too big of a chance that they will break OMV's nginx config doing it your way.

    I confirm and experienced the complexity, or rather the risks, and mentioned them in the preliminary notes. I completely understand the decision to withdraw the nginx plugin. I also understand that it is the policy of the OMV developers to rely on containers for extensions. Right? Hence your commitment, with the instructions for Docker. Thanks for that, I will use it, but only in the new year and for now, will end with the best wishes to you and all readers. Yours Ludwig

    I will still tell people to use docker

    D'Accord, for troubleshooting and support, all extensions in a container are actually easier for everyone. From this point of view, I am happy to agree with your basic recommendation for Docker solutions.


    I appreciate the discussion and understand your position very good. I configered nginx directly for my own educational purpose. For deployment, especially when someone expects support in this forum I would have choosen docker, too. Due to knowledge in in another topic. :)

    OMV6 on HDD, 2,4GHz-Core2Duo 4GB, MegaRAID-controller for data availability

    250GB SSD/Raid1 2TB HDD/Raid1 plus 2,2TB HDD for data backup

    • Official Post

    it quickly became clear that there would be no nginx-plugin for OMV6.

    There was no nginx plugin for OMV 5 either. I stopped supporting in OMV 4.x.


    I also understand that it is the policy of the OMV developers to rely on containers for extensions. Right?

    No. All omv-extras and most core OMV plugins are NOT containers. I did port the minidlna plugin to docker as a proof of concept but didn't release it. Volker did release a handful of plugins that use containers (podman). Basically if something does not have a plugin available, we tell people to use docker (or a VM or lxc).

    omv 7.5.0-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.15 | compose 7.3.2 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Only share information, no feedback expected. With every update I have the Error "Software Failure" in the Menues: network services user, last only in services. First I thought it's why my OMV6webGUI uses port:70 and I disabled the nginx reverse proxy, returned with OMV to port:80. All perfect. Then returned to port:70.

    After several updates I experienced, that I only have to clear the Browser Cache to prevent the "Software Failure"

    I started with Version 6.1.4-1 (Shaitan) Kernel Linux 6.0.0-0.deb11.2-amd64

    now at Version 6.1.5-1 (Shaitan) Kernel Linux 6.0.0-0.deb11.6-amd64

    OMV6 on HDD, 2,4GHz-Core2Duo 4GB, MegaRAID-controller for data availability

    250GB SSD/Raid1 2TB HDD/Raid1 plus 2,2TB HDD for data backup

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!