Page 1 of 1

url wil not open

Posted: Mon Jul 31, 2017 1:06 pm
by fileserver1
i run a file server
on

Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

file system openmediavault 4.0.2 arrakis
runing nginx

nginx version: nginx/1.10.3 (Ubuntu)

http://localhost/zm

Error 404

Sorry, the page you requested was not found.

how can i fix this problem
and is it posible to intergrate zoneminder in openmedivault

Re: url wil not open

Posted: Mon Jul 31, 2017 2:31 pm
by bbunge
Version of Zoneminder?

Re: url wil not open

Posted: Mon Jul 31, 2017 5:53 pm
by fileserver1
how can find the version i installed them with the manual https://launchpad.net/~iconnor/+archive ... zoneminder
en than in the ubuntu software center

Re: url wil not open

Posted: Mon Jul 31, 2017 6:11 pm
by fileserver1
the main runs openmediavault http://localhost is mediavault http://localhost/zm/index.php not work nginx is i think the problem the patch. i work years ago with apache i try now work with nginx.
the most and bigger systems work with nginx better resources of the machine say,s the info.

Re: url wil not open

Posted: Mon Jul 31, 2017 8:17 pm
by knight-of-ni
The packages from iconnor's ppa are configured for apache, not nginx. You will have to add and/or create a zoneminder nginx config file yourself.

Looks like Google reveals others who have already gone down this path:
https://www.google.com/search?q=zonemin ... 8&oe=utf-8

Might help.

Also, when you installed zoneminder, apache was likely installed as a dependency and may have been configured to start automatically (I don't know for certain). As long as the apache web server service is stopped and disabled, then this won't cause any problems.

Re: url wil not open

Posted: Thu Aug 03, 2017 5:35 pm
by rockedge
Would it possible to use the openmediavault nginx webserver to also serve the ZM web console pages? This should be possible with the correct configuration to run both OMV's web console and ZM's web console using one web server and just port 80.
Something to experiment with!

Re: url wil not open

Posted: Fri Aug 04, 2017 12:06 pm
by knight-of-ni
@rockedge Yes, that is exactly what I was suggesting in my previous post.

Re: url wil not open

Posted: Fri Aug 04, 2017 3:19 pm
by rockedge
I will set up a Nginx - ZM system and see what the configuration needs to be. Your idea sounds good. Then it should not be to hard to test it out in openmediavault.

Re: url wil not open

Posted: Fri Aug 04, 2017 5:28 pm
by knight-of-ni
@rockedge please check out the link provided earlier. The first hit points to a blog that tells you step-by-step how to do this for ubuntu. The author even shows how easy it is to setup https using letsencrypt (reminder I need to do this myself). The steps should be very close, if not identical, for Debian. No need to reinvent the wheel.

Re: url wil not open

Posted: Fri Aug 04, 2017 6:10 pm
by rockedge
@ knnniggett Thanks for the info!! I definitely will use the steps, any good set of instructions or hints is a winner. I used some of the Nginx info as examples to get ZM to work with Hiawatha.

Re: url wil not open

Posted: Mon Aug 07, 2017 4:13 am
by rockedge
I was able to install and run zoneminder 1.29.0 on port 80 in openmediavault using just the Nginx server. Both the openmediavault web console at http://<your_ip>/ and the zoneminder web console at http://<your_ip>/zm work.
Using the instructions here -> https://wiki.zoneminder.com/Debian_8_64 ... e_Easy_Way
then did ->

Code: Select all

apt-get install  fcgiwrap
as described here: https://github.com/ZoneMinder/ZoneMinde ... DME.Debian
## nginx / fcgiwrap

Nginx needs "php5-fpm" package to support PHP and "fcgiwrap" package
for binary "cgi-bin" applications:

sudo apt-get install php5-fpm fcgiwrap

To enable a URL alias that makes Zoneminder available from

http://yourserver/zm

the following line is to be added to "server" section of a web site
configuration:

include /usr/share/doc/zoneminder/examples/nginx.conf;

For "default" web site it would be sufficient to include the above
statement to the file

/etc/nginx/sites-enabled/default

To avoid problems with feeds from multiple cameras "fcgiwrap" should be
configured to start at least as many processes as there are cameras.
It can be done by adjusting DAEMON_OPTS in "/etc/default/fcgiwrap".
Systemd users may be affected by the following bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792705
I added this configuration -> https://github.com/ZoneMinder/ZoneMinde ... nginx.conf
to the server block in the configuration file : /etc/nginx/sites-available/openmediavault-webgui:

Code: Select all

location /zm/cgi-bin {
    gzip off;
    alias /usr/lib/zoneminder/cgi-bin;

    include /etc/nginx/fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $request_filename;
    fastcgi_pass  unix:/var/run/fcgiwrap.socket;
}

location /zm {
#   if ($scheme ~ ^http:){
#       rewrite ^(.*)$  https://$host$1 permanent;
#   }

    gzip off;
    alias                   /usr/share/zoneminder/www;
    index                   index.php;

    location ~ \.php$ {
        if (!-f $request_filename) { return 404; }
        expires             epoch;
        include             /etc/nginx/fastcgi_params;
        fastcgi_param       SCRIPT_FILENAME         $request_filename;
        fastcgi_index       index.php;
        fastcgi_pass        unix:/var/run/php5-fpm.sock;
    }

    location ~ \.(jpg|jpeg|gif|png|ico)$ {
        access_log          off;
        expires         33d;
    }
}
I originally installed ZM with the Apache server then shut it down and made /etc/init.d/apache2 non-executable to prevent it from starting at boot time.
after all is in place restart php5-fpm and Nginx