bind a nginx website to a virtual interface

    • Offizieller Beitrag

    I now want to bind an nginx website to it so I can use a separate SSL certificate in it. is there a "regular" way to do this in the OMV interface?


    There is an nginx plugin but it does not provide bind, it just configures the ports an assumes 0.0.0.0 (all).


    If you place your server block at /etc/nginx/sites-enabled/ you should have your web server working. Be aware that nginx is very strict and a faulty syntax/directive will bring the whole web server down at service reload.


    If you find it difficult to configure use the nginx plugin, bind to all interfaces and once is working copy the server block txt from this file


    /etc/nginx/sites-available/openmediavault-nginx


    to another one, and change the listen [::]:4001  to listen NEW_IP:4001

  • Thanks, I am quite fluid in nginx. My problem here is, that as the nginx plugin binds itself to all interfaces, I cannot bind the site which should be served on the separate IP to eth0:1 (as OMV is already listening on it). So I mainly need a way to persistently prevent, that OMV is binding on eth:1, in a way which is not overwritten next time I create a website via the interface.

    • Offizieller Beitrag

    What you are trying to do is really outside the scope of OMV and the nginx plugin. If you want to do what you are trying, you would need to edit /usr/share/openmediavault/mkconf/nginx.d/90-nginx-server. This would survive changes but you would need to re-edit that file whenever the plugin was updated. If you want to suggest a change to the plugin. create an issue here.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

    • Offizieller Beitrag

    You can use by-name as well if you want more than one site on port 80.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • @'subzero79 No, I want to use 443 on both addresses (with different certificates)
    @'ryecoaaron Thanks, I will give this a try.


    Are you sure the new post notifications of the forum are working? I didn't get any notification for an answer, only when @'subzero79 quoted me in the first post.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!