Customize Nginx-Plugin Server Configuration

  • Hi all,


    I used the Nginx Plugin to create an additional server. It is up and running but I would like to add some additional configuration (like this: https://miete-admin.de/blog/dd…-mit-nginx-abmildern.html). As far as I can see this is not possible using the web interface as the additional configuration there always goes into the "server" block of the config file but I need as well something in the "location" block. Changing the configuration file itself doesn't make sense as well as this will be overwritten when restarting the server. So where and how should I do that?


    Thanks,
    Oliver

    • Offizieller Beitrag

    You will have to manually configure an nginx web site without the plugin or file an issue here. Although, if you have a big enough web site that you are worried about a DDoS, I probably wouldn't use OMV to host it.

    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!

  • Actually, I'm the only one using the website so no, it is not very big :) But it is protected using "auth_basic "Restricted Content";" and I can see in the log that someone is trying to access the page by trying random user name and password combinations. And I hoped to make their lives a little bit more annoying by allowing only one connection every few seconds. This would be enough for me.

    • Offizieller Beitrag

    I can see in the log that someone is trying to access the page by trying random user name and password combinations.

    Is it always the same IP address or range of IP addresses? You could just block them at the firewall level. The fail2ban plugin might works as well but I'm not sure about that.

    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!

  • Back to the original topic:


    You can put the 'location' block inside the 'server' block... so you can just paste the location block in the extra options within the OMV/nginx add/edit server pop-up.


    What does become a problem is that you cannot have more than one server listening on the same port. While this is possible in nginx (as long as only one is the default server), the OMV interface does not allow it.

    • Offizieller Beitrag

    While this is possible in nginx (as long as only one is the default server), the OMV interface does not allow it.

    The plugin does allow it if you use name-based for the host type. It is also easy to do with docker if you have a proxy container and since the plugin isn't going to ported to 5.x, I would recommend the docker method.

    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!

Jetzt mitmachen!

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