nginx, zm and ubuntu
nginx, zm and ubuntu
Hello everyone. How to make install? something didn't work out
Re: nginx, zm and ubuntu
Hi Cramac1.
I've a wotking installtion with nginx on Ubuntu ...
You can follow this wiki entry https://wiki.zoneminder.com/Ubuntu_Serv ... .2C_PHP.29 with few changes to use the 1.36 PPA and Ubuntu Focal
My best,
.m.
I've a wotking installtion with nginx on Ubuntu ...
You can follow this wiki entry https://wiki.zoneminder.com/Ubuntu_Serv ... .2C_PHP.29 with few changes to use the 1.36 PPA and Ubuntu Focal
My best,
.m.
Re: nginx, zm and ubuntu
api did not work:
https://video.ru/zm/api/host/login.json
return 404 error
Code: Select all
server {
listen 80;
server_name = video.ru;
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/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 {
# 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; }
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param HTTP_PROXY "";
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ \.(jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 33d;
}
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/video.ru/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/video.ru/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
return 404 error
Re: nginx, zm and ubuntu
work
Code: Select all
location /zm {
gzip off;
alias /usr/share/zoneminder/www;
index index.php;
location ~ \.php$ {
if (!-f $request_filename) { return 404; }
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param HTTP_PROXY "";
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location /zm/api/ {
auth_basic off;
alias /usr/share/zoneminder/www;
rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;
}
location ~ \.(jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 33d;
}
}