OMV with Nginx instead of Apache

  • I am interested to use OMV, but I prefer to use Nginx instead of Apache. So I plan to manually install OMV on my Debian server. Do you think this is feasible? If so, does any of you try that or know a blog about that? Or am I looking for troubles? Thanks in advance.

  • Zitat von "WastlJ"

    Have a look here:
    http://forums.openmediavault.org/viewtopic.php?f=3&t=4243


    And I would definitely wait for OMV 1.0...


    Thanks for your response J.


    I dug up this forum before I posted my question so I have read that discussion before. However, it does not provide explicit answer. If I understood that right, I have to install OMV with Apache first. Then install Nginx and try to have it working with the OMV plugins. And finally, uninstall Apache. What I am looking for is a clean install of OMV with Nginx, because it is quite a pain to uninstall Apache due to its dependencies.


    I will try to play around a bit while I am waiting for v1.0.

    • Offizieller Beitrag

    Apache is a dependency of OMV. No way around it and I know from speaking with Volker that that will not change. It isn't a pain to install apache because OMV configures it.


    Code
    Install base wheezy system with no extra packages (no apache, no php, etc)
    
    
    echo "deb http://packages.openmediavault.org/public kralizec main" > /etc/apt/sources.list.d/openmediavault.list
    apt-get update
    apt-get install openmediavault-keyring postfix
    apt-get update
    apt-get install openmediavault
    omv-initsystem


    No configuring apache in that, is there :)


    It shouldn't matter what the omv web interface is hosted with. You don't have to use apache for sites. I don't. The nginx plugin works very well and is integrated with OMV web interface. The plugin works fine on 0.5 but it is a little more difficult to get nginx on squeeze. If you are comfortable enough with Linux, install Wheezy, omv 0.6 (using above instructions) and the nginx plugin. You will see what I mean. If you aren't accessing OMV's web interface, it won't matter that two web servers are running.

    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!

  • Yes. Indeed there is no configuration of Apache and it is very easy to configure it. But my point is, I don't want to have Apache installed at all as I hate it to my bone, especially for the purpose to provide web based GUI.


    You gave me a bit more hint though, for achieving what I want to have. I just checked all repositories under http://packages.openmediavault.org/public/dists/. As you said, OMV depends on apache. So there is no way I will be able to avoid apache being installed unless I recompile it without dependency to Apache. I guess that is what I need to do if I still want to use OMV.

    • Offizieller Beitrag

    Apache is more than just a dependency for the OMV .deb. Last time I tried, the web interface did work (limited testing) with nginx but there are apache files it will config and other files that will try to restart apache. I don't understand why you care what server is serving the web interface pages though. It will be a LOT of work for very little gain... OMV code is 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!

  • Zitat von "ryecoaaron"

    I don't understand why you care what server is serving the web interface pages though. It will be a LOT of work for very little gain... OMV code is here.


    The answer is resource efficiency, especially on low resource system (RAM+CPU). So I don't think there will be very little gain in using Nginx as opposed to Apache. As an extreme example, just imagine how Wifi router would perform if the web interface is running on Apache.


    After digging up this forum more, I found that I am not the only one asking about this. Somebody even requested a new feature for this, http://bugtracker.openmediavault.org/view.php?id=729. But I am not trying to demand anything by pointing that out. I will try to do what I want to achieve myself. So don't worry about this.


    Thanks for the link to OMV's code. I actually already svn checked-out that into my Debian PC a few hours ago, and started exploring and understanding what I need to change to remove all dependencies to Apache. Let's see in 2 weeks either to drop OMV or not.

  • I'd personally would like an abstraction layer for the web server in OMV. I don't think it should be that difficult since not many things touch the web server config. You'd need to tell OMV what server you'd like to use and then just abstract things like enabling and disabling of sites I guess.


    If you want OMV up and running with Nginx and php-fpm I use these configs to do the job:
    /etc/nginx/sites-available/openmediavault


    /etc/php5/fpm/pool.d/openmediavault.conf


    This won't include certain services with their own sites like Owncloud, but I don't see how that should be hard to fix :) All you have to do then is to build the openmediavault package without apache as a dependency. It's however not fun doing that for each update.

    • Offizieller Beitrag

    While agree with those points, the web interface in OMV 0.6 is fast even on RPi and cubieboard. If you are successful, submit the changes to Volker. I like nginx better myself but haven't a reason to make the changes.

    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
    Zitat von "subzeroin"

    I'd personally would like an abstraction layer for the web server in OMV.


    If you wrote the stuff, maybe Volker would include 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!

  • Zitat von "subzeroin"

    It's however not fun doing that for each update.


    Yes. I can imagine the pain to re-apply all changes every time after the updates. But if I would have OMV running with Nginx, it will be based on trunk. So I will definitely not do the updates everyday. :D


    And thanks a lot for the configs and the hints. I really appreciate that.

  • Zitat von "ryecoaaron"

    While agree with those points, the web interface in OMV 0.6 is fast even on RPi and cubieboard. If you are successful, submit the changes to Volker. I like nginx better myself but haven't a reason to make the changes.


    I am actually still at a very early stage of having a NAS system, i.e. research stage. I just got Lian Li PC-Q08 Mini-ITX case last week, so I still need to buy a lot of parts. I am still searching for low power Mini-ITX board like ASUS C60M1-I but found nothing close to that yet. Does anybody has suggestion? :)


    However, I will try to set up my RPi as test system for OMV with Nginx in the next few days (when I have spare time). But I am not sure though if the result will be worth it to be submitted for changes. It would possibly be better after I have it running on a real NAS system.

    • Offizieller Beitrag

    Interesting... Just a had a quick look. There seems to be only one file (one line at that) you would have to monitor for changes between versions - usr/share/openmediavault/engined/module/webadmin.inc. The other three files (apache module, apache mkconf, and apache monit) that need changes would be replaced by nginx versions completely. You would just have to make sure the replacements worked with newer versions. I may have missed something but it doesn't look bad at all.

    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

    It works :)


    Changed five files and OMV 0.6.0.9 installs without apache and works fine so far. My quick hack (with subzero's config) ignores web admin settings but it works. Changed two files, deleted three, and created three. So patching the source each version would consist of editing the debian control and postinst files, removing three apache files, and adding three nginx files. Interesting... :)

    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!

  • Zitat von "ryecoaaron"

    It works :)


    That is so not fair! :D
    You have it working already while I am still trying to understand how OMV core interacts with its plugins.
    Ok then. I will start with a "dirty path". I hope I will catch you before the weekend.

    • Offizieller Beitrag

    Here are my changes :) I think I got them all. I was just doing it to see how easy it was. I don't plan on doing anymore.


    Change debian/control - line 11 to:

    Code
    Depends: libjs-extjs4 (>= 4.2.2), nginx, php5-fpm,


    Delete usr/share/openmediavault/mkconf/monit.d/apache:
    Create usr/share/openmediavault/mkconf/monit.d/nginx:


    Delete usr/share/openmediavault/mkconf/apache
    Create usr/share/openmediavault/mkconf/nginx


    Delete usr/share/openmediavault/engined/module/apache.inc
    Create usr/share/openmediavault/engined/module/nginx.inc


    Change debian/openmediavault.postinst to:

    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

    I can confirm that nginx is noticeably faster on a cubieboard using the regular nginx package. I will have to try nginx-light.

    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!

  • Sounds encouraging. The loading of some of the more intense interfaces could benefit from being less laggy on my system (HP54NL), i.e. OMV interface, rutorrent and owncloud (although Im aware owncloud may be other issues). Nginx seems to be flavour of the month at the moment, I assume due to its popularity on Raspberry Pi’s . . . It would seem that Nginx is more suited to the OMV application, if its faster as well Im interested in this.

    • Offizieller Beitrag

    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!