cgi path error on Ubuntu 18.04 / Nginx / MariaDB [solved]

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
brozz
Posts: 1
Joined: Tue Mar 05, 2019 11:52 am

cgi path error on Ubuntu 18.04 / Nginx / MariaDB [solved]

Post by brozz »

Hi there.
Yesterday I installed Zoneminder on my office computer, following this : https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

Ubuntu 18.04
Zoneminder 1.32.3 from iconnor ppa

Testing stream with an USB - local Cam, appeared the socket error, due to a wrong cgi path in my zoneminder.conf
Socket /var/run/zm/zms-010422s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information.
After many tries, I solved the issue by editing my nginx conf for Zoneminder:

Code: Select all

nano /etc/nginx/zoneminder.conf
and change :

Code: Select all

location /cgi-bin {
auth_basic off;
        alias /usr/lib/zoneminder/cgi-bin;     
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_param HTTP_PROXY "";
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
paste form the wiki

to

Code: Select all

location /zm/cgi-bin {
auth_basic off;
        alias /usr/lib/zoneminder/cgi-bin;     
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_param HTTP_PROXY "";
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
then

Code: Select all

service nginx restart
systemctl restart zoneminder
It works !
Post Reply