Page 1 of 1

Bookworm, ZM 1.36.xx and Nginx

Posted: Wed Oct 11, 2023 1:06 pm
by brainbug
Hi,

wanted to add "nginx configuration" to https://wiki.zoneminder.com/Debian_12_B ... er_1.36.33, but i can not login. Maybe i am too stupid for that :mrgreen:


This is nearby the same conf file as from nginx with Bullseye, just two little differences:
it has to be "/zm/cgi-bin" and not "/cgi-bin"
it has to be php-8.2 instead if php-7.4

Maybe someone wants to add this into the wiki? :-)

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;
}
location /zm/cache {
auth_basic off;
        alias /var/cache/zoneminder/cache;
}
location ~ /zm/api/(css|img|ico) {
auth_basic off;
        rewrite ^/zm/api(.+)$ /api/app/webroot/$1 break;
        try_files $uri $uri/ =404;
}
location /zm {
auth_basic off;
        alias /usr/share/zoneminder/www;
        try_files $uri $uri/ /index.php?$args =404;    
        location /zm/api {
auth_basic off;
                rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;
         }
                location ~ \.php$ {
                auth_basic off;
                        include fastcgi_params;
                        fastcgi_param SCRIPT_FILENAME $request_filename;
                        fastcgi_param HTTP_PROXY "";
                fastcgi_index index.php;
                        fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
        }
    }
Before i mentioned this, i also installed fcgiwrap, php-8.2-cgi and php-8.2-fpm, but i do not know if this is needed?! Apache2 is running fine without these packages installed.

Regardes