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.
OMV with Nginx instead of Apache
-
-
Have a look here:
http://forums.openmediavault.org/viewtopic.php?f=3&t=4243And I would definitely wait for OMV 1.0...
-
Zitat von "WastlJ"
Have a look here:
http://forums.openmediavault.org/viewtopic.php?f=3&t=4243And 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.
-
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.
CodeInstall 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 thereIt 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.
-
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.
-
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.
-
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/openmediavaultCode
Alles anzeigenserver { listen 80 default_server; root /var/www/openmediavault; index index.php; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/openmediavault-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location /extjs/ { alias /usr/share/javascript/extjs4/; } location /images/ { alias /var/www/openmediavault/images/; } large_client_header_buffers 4 32k; access_log /var/log/nginx/openmediavault-access.log; error_log /var/log/nginx/openmediavault-error.log; }
/etc/php5/fpm/pool.d/openmediavault.confCode
Alles anzeigen[openmediavault] listen = /var/run/openmediavault-fpm.sock listen.owner = www-data listen.mode = 0600 user = openmediavault group = openmediavault pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 ; OpenMediaVault php.ini settings ; Paths and Directories php_value[include_path] = ".:/usr/share/php:/var/www/openmediavault" ; Pam Authentication Support (see /etc/pam.d) ; php_value[pam.servicename] = "openmediavault"; ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize php_value[upload_max_filesize] = 25M ; Maximum size of POST data that PHP will accept. ; http://php.net/post-max-size php_value[post_max_size] = 25M ; Do not expose to the world that PHP is installed on the server. ; http://php.net/expose-php php_flag[expose_php] = Off ; Name of the session (used as cookie name). ; http://php.net/session.name php_value[session.name] = OMVSESSID ; Default timeout for socket based streams (seconds) ; http://php.net/default-socket-timeout php_value[default_socket_timeout] = 90 ; Maximum execution time of each script, in seconds ; http://php.net/max-execution-time ; Note: This directive is hardcoded to 0 for the CLI SAPI php_value[max_execution_time] = 90
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. -
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.
-
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 -
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.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.
-
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.
-
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...
-
Zitat von "ryecoaaron"
It works
That is so not fair!
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. -
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:
Delete usr/share/openmediavault/mkconf/monit.d/apache:
Create usr/share/openmediavault/mkconf/monit.d/nginx:Bash
Alles anzeigen#!/bin/sh set -e . /etc/default/openmediavault . /usr/share/openmediavault/scripts/helper-functions OMV_MONIT_SERVICE_NGINX_CONFIG="/etc/monit/conf.d/openmediavault-nginx.conf" OMV_MONIT_SERVICE_NGINX_MODE="active" cat <<EOF > ${OMV_MONIT_SERVICE_NGINX_CONFIG} check process nginx with pidfile /var/run/nginx.pid start program = "/etc/init.d/nginx start" stop program = "/etc/init.d/nginx stop" mode ${OMV_MONIT_SERVICE_NGINX_MODE} EOF # Disable event notifications. xmlstarlet sel -t -m "//system/email" \ -i "enable = '1'" \ -i "//system/notification/notifications/monitprocevents = '0'" \ -v "concat(' noalert ',primaryemail)" \ -b \ -b \ -n \ ${OMV_CONFIG_FILE} | xmlstarlet unesc >> ${OMV_MONIT_SERVICE_NGINX_CONFIG}
Delete usr/share/openmediavault/mkconf/apache
Create usr/share/openmediavault/mkconf/nginxBash
Alles anzeigen#!/bin/sh set -e . /etc/default/openmediavault . /usr/share/openmediavault/scripts/helper-functions OMV_NGINX_SITE_OPENMEDIAVAULT_CONFIG="/etc/nginx/sites-available/openmediavault" OMV_NGINX_SITE_OPENMEDIAVAULT_ENABLED="/etc/nginx/sites-enabled/openmediavault" OMV_NGINX_PHP5_FPM_CONFIG="/etc/php5/fpm/pool.d/openmediavault.conf" cat <<EOF > ${OMV_NGINX_SITE_OPENMEDIAVAULT_CONFIG} server { listen 80 default_server; root /var/www/openmediavault; index index.php; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/openmediavault-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location /extjs/ { alias /usr/share/javascript/extjs4/; } location /images/ { alias /var/www/openmediavault/images/; } large_client_header_buffers 4 32k; access_log /var/log/nginx/openmediavault-access.log; error_log /var/log/nginx/openmediavault-error.log; } EOF cat <<EOF > ${OMV_NGINX_PHP5_FPM_CONFIG} [openmediavault] listen = /var/run/openmediavault-fpm.sock listen.owner = www-data listen.mode = 0600 user = openmediavault group = openmediavault pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 ; OpenMediaVault php.ini settings ; Paths and Directories php_value[include_path] = ".:/usr/share/php:/var/www/openmediavault" ; Pam Authentication Support (see /etc/pam.d) ; php_value[pam.servicename] = "openmediavault"; ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize php_value[upload_max_filesize] = 25M ; Maximum size of POST data that PHP will accept. ; http://php.net/post-max-size php_value[post_max_size] = 25M ; Do not expose to the world that PHP is installed on the server. ; http://php.net/expose-php php_flag[expose_php] = Off ; Name of the session (used as cookie name). ; http://php.net/session.name php_value[session.name] = OMVSESSID ; Default timeout for socket based streams (seconds) ; http://php.net/default-socket-timeout php_value[default_socket_timeout] = 90 ; Maximum execution time of each script, in seconds ; http://php.net/max-execution-time ; Note: This directive is hardcoded to 0 for the CLI SAPI php_value[max_execution_time] = 90 EOF if [ ! -e "${OMV_NGINX_SITE_OPENMEDIAVAULT_ENABLED}" ]; then ln -s OMV_NGINX_SITE_OPENMEDIAVAULT_CONFIG OMV_NGINX_SITE_OPENMEDIAVAULT_ENABLED fi
Delete usr/share/openmediavault/engined/module/apache.inc
Create usr/share/openmediavault/engined/module/nginx.incPHP
Alles anzeigen<?php /** * This file is part of OpenMediaVault. * * @license http://www.gnu.org/licenses/gpl.html GPL Version 3 * @author Volker Theile <volker.theile@openmediavault.org> * @copyright Copyright (c) 2009-2014 Volker Theile * * OpenMediaVault is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * OpenMediaVault is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>. */ require_once("openmediavault/module.inc"); require_once("openmediavault/error.inc"); require_once("openmediavault/initscript.inc"); class OMVModuleNginx extends OMVModuleServiceAbstract { /** * Get the module name. */ public function getName() { return "nginx"; } /** * Defines the modules that if present should build their configuration * before the service provided by this module. * @return An array of modules. */ public function shouldApply() { return array("certificatemgmt"); } /** * Generate the configuration. * @throw E_EXEC_FAILED */ public function applyConfig() { $cmd = "omv-mkconf ngninx 2>&1"; if(0 !== $this->exec($cmd, $output)) { throw new OMVException(OMVErrorMsg::E_EXEC_FAILED, $cmd, implode("\n", $output)); } } /** * Start the managed service. */ public function startService() { $initd = new OMVSysVInitScript("nginx", TRUE); $initd->invoke("reload"); } } // Register module. $moduleMgr = &OMVModuleMgr::getInstance(); $moduleMgr->registerModule(new OMVModuleNginx()); ?>
Change debian/openmediavault.postinst to:
Bash
Alles anzeigen#!/bin/sh # # This file is part of OpenMediaVault. # # @license http://www.gnu.org/licenses/gpl.html GPL Version 3 # @author Volker Theile <volker.theile@openmediavault.org> # @copyright Copyright (c) 2009-2014 Volker Theile # # OpenMediaVault is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version. # # OpenMediaVault is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>. set -e . /etc/default/openmediavault . /usr/share/openmediavault/scripts/helper-functions case "$1" in configure) # Disable the default Nginx site NGINX_DEFAULT_ENABLED_CONF=/etc/nginx/sites-enabled/default if [ -e "${NGINX_DEFAULT_ENABLED_CONF}" ]; then /bin/rm "${NGINX_DEFAULT_ENABLED_CONF}" fi ######################################################################## # Set the default settings to those expected by OpenMediaVault. ######################################################################## if [ -z "$2" ]; then #################################################################### # Install configuration file #################################################################### if [ ! -e "${OMV_CONFIG_FILE}" ]; then echo "Installing default configuration" cp ${OMV_CONFIG_TEMPLATE_FILE} ${OMV_CONFIG_FILE} fi #################################################################### # Create user 'openmediavault' which is used to run the web # interface. #################################################################### if ! getent passwd openmediavault > /dev/null 2>&1; then useradd --system --user-group openmediavault || : fi #################################################################### # Create user 'admin' which is used as the web interface # administrator account. Default password is 'openmediavault'. #################################################################### if ! getent passwd admin > /dev/null 2>&1; then useradd --system --no-user-group --password '$1$PjiW4uIZ$agjyA0foLeAcHClwOuad1.' \ --shell '/usr/sbin/nologin' --comment 'WebGUI administrator' admin || : fi #################################################################### # Update the local plugin packages archive. The 'packages' command # should be run in the root of the tree. #################################################################### echo "Updating local package archive ..." cd ${OMV_DPKGARCHIVE_DIR} && apt-ftparchive packages . > Packages #################################################################### # Setup services #################################################################### echo "Updating init scripts actions ..." invoke-rc.d --force ntp stop update-rc.d ntp disable &>/dev/null invoke-rc.d --force smartmontools stop update-rc.d smartmontools disable &>/dev/null invoke-rc.d --force tftpd-hpa stop update-rc.d tftpd-hpa disable &>/dev/null invoke-rc.d --force rsync stop update-rc.d rsync disable &>/dev/null invoke-rc.d --force ssh stop update-rc.d ssh disable &>/dev/null invoke-rc.d --force snmpd stop update-rc.d snmpd disable &>/dev/null invoke-rc.d --force proftpd stop update-rc.d proftpd disable &>/dev/null invoke-rc.d --force nfs-kernel-server stop update-rc.d nfs-kernel-server disable &>/dev/null invoke-rc.d --force samba stop update-rc.d samba disable &>/dev/null invoke-rc.d --force postfix stop update-rc.d postfix disable &>/dev/null update-rc.d openmediavault defaults &>/dev/null update-rc.d openmediavault-beep defaults &>/dev/null update-rc.d openmediavault-engined defaults &>/dev/null #################################################################### # Setup apache configuration #################################################################### # Documentation/Howto: # http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-debian-lenny # http://www.christophfischer.com/linux/12-apache/47-apache-server-mit-php-fastcgi-und-debian-50-lenny # http://wiki.hetzner.de/index.php/Apache_PHP5_fcgi_und_SuExec #################################################################### echo "Configuring web server" omv-mkconf nginx #a2enmod suexec #a2enmod fcgid #a2enmod ssl #a2enmod rewrite #a2dissite 000-default #a2ensite openmediavault-webgui fi # Create public/private SSH key pair for user root if [ ! -f "/root/.ssh/id_rsa.pub" ]; then ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa fi ######################################################################## # Setup permissions ######################################################################## # Documentation/Howto: # http://www.christophfischer.com/linux/12-apache/47-apache-server-mit-php-fastcgi-und-debian-50-lenny ######################################################################## # These permissions are required by Apache chown -R openmediavault:openmediavault /etc/openmediavault \ /var/cache/openmediavault ${OMV_DOCUMENTROOT_DIR} chmod 755 /var/www chmod 600 ${OMV_CONFIG_FILE} dpkg-trigger update-fixperms || omv_install_fixperms ######################################################################## # Install locale files. ######################################################################## dpkg-trigger update-locale || omv_install_locale ######################################################################## # Generate configurations ######################################################################## if [ -z "$2" ]; then omv-mkconf mdadm omv-mkconf cpufrequtils omv-mkconf cron-apt omv-mkconf watchdog omv-mkconf monit omv-mkconf rrdcached fi omv-mkconf collectd ######################################################################## # Restart services ######################################################################## if [ -z "$2" ]; then echo "Restarting services ..." invoke-rc.d cron restart invoke-rc.d watchdog restart invoke-rc.d rrdcached restart invoke-rc.d collectd restart invoke-rc.d nginx reload invoke-rc.d monit restart fi dpkg-trigger restart-engined || monit restart omv-engined ######################################################################## # Action to be done depending on the previous version. ######################################################################## echo "Updating configuration ..." if dpkg --compare-versions "$2" lt-nl "0.5"; then # Set default envionment variables. omv_set_default "OMV_CACHE_DIR" "/var/cache/openmediavault" omv_set_default "OMV_CERTIFICATE_PREFIX" "openmediavault-" omv_set_default "OMV_CONFIGIMPORT_SCRIPTS_DIR" "/usr/share/openmediavault/configimport" omv_set_default "OMV_MKCONF_SCRIPTS_DIR" "/usr/share/openmediavault/mkconf" omv_set_default "OMV_ENGINED_DIR" "/usr/share/openmediavault/engined" omv_set_default "OMV_ENGINED_SO_ADDRESS" "/var/lib/openmediavault/engined.sock" omv_set_default "OMV_ENGINED_SO_SNDTIMEO" "10" omv_set_default "OMV_ENGINED_SO_RCVTIMEO" "180" omv_set_default "OMV_ENGINED_DIRTY_MODULES_FILE" "/var/lib/openmediavault/dirtymodules.json" omv_set_default "OMV_INITSYSTEM_SCRIPTS_DIR" "/usr/share/openmediavault/initsystem" omv_set_default "OMV_APACHE2_SUEXECUSERGROUP" "openmediavault" # Add avahi configurations. omv_config_add_element "/config/services" "zeroconf" "" omv_config_add_element "/config/services/zeroconf" "services" "" omv_config_add_element "/config/services/zeroconf/services" "service" "<id>webadmin</id><enable>1</enable><name>%h - Web administration</name>" true omv_config_add_element "/config/services/zeroconf/services" "service" "<id>ssh</id><enable>1</enable><name>%h - SSH</name>" true omv_config_add_element "/config/services/zeroconf/services" "service" "<id>nfs</id><enable>1</enable><name>%h - NFS</name>" true omv_config_add_element "/config/services/zeroconf/services" "service" "<id>ftp</id><enable>1</enable><name>%h - FTP</name>" true omv_config_add_element "/config/services/zeroconf/services" "service" "<id>tftp</id><enable>1</enable><name>%h - TFTP</name>" true omv_config_add_element "/config/services/zeroconf/services" "service" "<id>smb</id><enable>1</enable><name>%h - SMB/CIFS</name>" true omv_config_add_element "/config/services/zeroconf/services" "service" "<id>rsync</id><enable>1</enable><name>%h - Rsync</name>" true omv_config_delete "//dnssd" # Add notification configurations. omv_config_add_element "/config/system" "notification" "" omv_config_add_element "/config/system/notification" "notifications" "" omv_config_add_element "/config/system/notification/notifications" "monitprocevents" "1" omv_config_add_element "/config/system/notification/notifications" "monitloadavg" "1" omv_config_add_element "/config/system/notification/notifications" "monitmemoryusage" "1" omv_config_add_element "/config/system/notification/notifications" "monitcpuusage" "1" omv_config_add_element "/config/system/notification/notifications" "monitfilesystems" "1" omv_config_add_element "/config/system/notification/notifications" "mdadm" "1" omv_config_add_element "/config/system/notification/notifications" "smartmontools" "1" # Add new Rsync module option. omv_config_add_element "/config/services/rsync/server/modules/module" "usechroot" "1" # Add comment to network interface configurations. omv_config_add_element "/config/system/network/interfaces/iface" "comment" "" omv_config_add_element "/config/system/network/interfaces/bondiface" "comment" "" # Add 'aio' option to SMB/CIFS server. Configuration will be # reloaded automatically. omv_config_add_element "/config/services/smb" "aio" "1" omv-mkconf samba # Add new S.M.A.R.T. scheduled test option. omv_config_add_element "/config/services/smart/scheduledtests/job" "enable" "1" # Remove user 'openmediavault' from sudoers list. sed -i -e '/^%openmediavault/d' /etc/sudoers # Recreate certificates. omv-mkconf certificates # Start engine. omv-mkconf monit invoke-rc.d monit restart update-rc.d openmediavault-engined defaults &>/dev/null dpkg-trigger restart-engined || monit restart omv-engined # Update apache2 configuration. omv-mkconf nginx invoke-rc.d nginx reload fi if dpkg --compare-versions "$2" lt-nl "0.5.0.21"; then # Set IPv6 interface configurations. omv_config_add_element "/config/system/network/interfaces/*[name()='iface' or name()='bondiface']" "method6" "manual" omv_config_add_element "/config/system/network/interfaces/*[name()='iface' or name()='bondiface']" "address6" "" omv_config_add_element "/config/system/network/interfaces/*[name()='iface' or name()='bondiface']" "netmask6" "64" omv_config_add_element "/config/system/network/interfaces/*[name()='iface' or name()='bondiface']" "gateway6" "" # Modify firewall rules. omv_config_add_element "/config/system/network/iptables/rule" "family" "inet" # Modify sysctl settings. echo 0 > /proc/sys/net/ipv6/conf/all/autoconf echo 0 > /proc/sys/net/ipv6/conf/default/autoconf echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra echo 0 > /proc/sys/net/ipv6/conf/default/accept_ra echo 0 > /proc/sys/net/ipv6/conf/lo/disable_ipv6 fi if dpkg --compare-versions "$2" lt-nl "0.5.0.24"; then omv-mkconf collectd monit restart collectd fi if dpkg --compare-versions "$2" lt-nl "0.5.4"; then omv-mkconf ntp fi if dpkg --compare-versions "$2" lt-nl "0.5.8"; then omv_config_add_element "/config/system/notification/notifications" "cronapt" "1" fi if dpkg --compare-versions "$2" lt-nl "0.5.9"; then update-rc.d acpid enable invoke-rc.d acpid start omv-mkconf monit invoke-rc.d monit restart fi if dpkg --compare-versions "$2" lt-nl "0.5.11"; then omv-mkconf collectd fi if dpkg --compare-versions "$2" lt-nl "0.5.15"; then omv_config_add_element "/config/services/ftp" "transferlog" "0" omv-mkconf proftpd service proftpd reload fi if dpkg --compare-versions "$2" lt-nl "0.5.23"; then omv-mkconf nginx invoke-rc.d nginx reload fi if dpkg --compare-versions "$2" lt-nl "0.5.26"; then omv_config_add_element "/config/system" "apt" "" omv_config_add_element "/config/system/apt" "distribution" "" omv_config_add_element "/config/system/apt/distribution" "proposed" "0" omv_config_add_element "/config/system/apt/distribution" "partner" "0" fi if dpkg --compare-versions "$2" lt-nl "0.5.32"; then omv-mkconf collectd monit restart collectd udevadm control --reload-rules omv-mkconf sysctl sysctl -e -p fi if dpkg --compare-versions "$2" lt-nl "0.5.37"; then omv-mkconf nginx a2enmod rewrite || true invoke-rc.d nginx reload fi if dpkg --compare-versions "$2" lt-nl "0.5.39"; then omv_config_add_element "/config/services/smart" "monitor" "" xmlstarlet sel -t -m "/config/system/storage/hdparm" \ -v "uuid" \ -i "position() != last()" -n -b \ ${OMV_CONFIG_FILE} | xmlstarlet unesc | while read uuid; do devicefile=$(omv_config_get "/config/system/storage/hdparm[uuid='${uuid}']/devicefile") enable=$(omv_config_get "/config/system/storage/hdparm[uuid='${uuid}']/smart/enable") object="<uuid>$(omv_uuid)</uuid>" object="${object}<devicefile>${devicefile}</devicefile>" object="${object}<enable>${enable}</enable>" object="${object}<type></type>" omv_config_add_element "/config/services/smart/monitor" "device" "${object}" true omv_config_delete "/config/system/storage/hdparm[uuid='${uuid}']/smart" done fi if dpkg --compare-versions "$2" lt-nl "0.5.41"; then omv-mkconf cron-apt fi if dpkg --compare-versions "$2" lt-nl "0.5.45"; then omv-mkconf rsyncd fi if dpkg --compare-versions "$2" lt-nl "0.6"; then # Relocate RRD database files. cp -r /var/lib/collectd/rrd/localhost /var/lib/rrdcached/db # Convert database. xmlstarlet sel -t -m "/config/system/fstab/mntent[contains(dir,'/home/ftp')]" \ -v "uuid" \ -i "position() != last()" -n -b \ ${OMV_CONFIG_FILE} | xmlstarlet unesc | while read uuid; do dir=$(omv_config_get "/config/system/fstab/mntent[uuid='${uuid}']/dir" | sed -e 's#^/home/ftp#/srv/ftp#i') omv_config_update "/config/system/fstab/mntent[uuid='${uuid}']/dir" "${dir}" mkdir -p "${dir}" done # Add SMB/CIFS share option. omv_config_add_element "/config/services/smb/shares/share" "audit" "0" # Rebuild configuration files. omv-mkconf collectd omv-mkconf rrdcached omv-mkconf monit omv-mkconf proftpd omv-mkconf fstab omv-mkconf samba # Restart services. monit restart rrdcached monit restart collectd fi if dpkg --compare-versions "$2" lt-nl "0.6.0.3"; then # Disable proftpd memcache module, support is not enabled in # the Debian Wheezy package. sed -i -e "s/^\(LoadModule mod_tls_memcache.c\)/#\1/i" /etc/proftpd/modules.conf fi if dpkg --compare-versions "$2" lt-nl "0.6.0.4"; then # Rebuild monit service configuration files. omv-mkconf monit invoke-rc.d monit reload # Unlink configuration backup file. rm -f "${OMV_CONFIG_FILE}.bak" fi ;; triggered) ######################################################################## # Execute triggers ######################################################################## for trigger in $2; do case "${trigger}" in update-locale) echo "Updating locale files ..." omv_install_locale ;; update-fixperms) echo "Updating file permissions ..." omv_install_fixperms ;; restart-engined) echo "Restarting engine daemon ..." monit restart omv-engined || invoke-rc.d openmediavault-engined restart esac done ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument '$1'" >&2 exit 1 ;; esac exit 0
-
I will do some testswith Apache and Nginx on my old test system and a CuBox. After that i will decide which webserver OMV will use in the next version.
I think i will start with nginx-light which should include all necessary modules like FastCGI, Rewrite or IPv6. -
I can confirm that nginx is noticeably faster on a cubieboard using the regular nginx package. I will have to try nginx-light.
-
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.
-
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!