Everything works perfectly fine when I access it directly on http://192.168.1.14/zm/. I can view the camera live stream, event recordings etc.
However, I'm also running a separate server with Nginx acting as a reverse proxy to access ZoneMinder from the internet.
I can access ZM and login without issues. Everything seems to work, except watching the camera live stream or event recordings.
Here's a picture how it looks like:
Looking in the ZM log I get the following error from web_php:
PATH_ZMS seems to be correct. I also tried adding /zm in front as suggested in another forum thread, but it didn't help.Socket /run/zoneminder/zms-232592s.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.
Code: Select all
[root@zm ~]# grep PATH_ZMS /etc/zoneminder/conf.d/01-system-paths.conf
ZM_PATH_ZMS=/cgi-bin/nph-zms
Code: Select all
server {
listen 80;
root /usr/share/webapps/zoneminder/www;
index index.php;
access_log /var/log/zoneminder/http_access.log;
error_log /var/log/zoneminder/http_error.log;
location / {
try_files $uri $uri/ /index.php?$args =404;
location ~ /api/(css|img|ico) {
rewrite ^/api(.+)$ /api/app/webroot/$1 break;
try_files $uri $uri/ =404;
}
location /api {
rewrite ^/api(.+)$ /api/app/webroot/index.php?p=$1 last;
}
location /cgi-bin {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param HTTP_PROXY "";
fastcgi_pass unix:/run/fcgiwrap.sock;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param HTTP_PROXY "";
fastcgi_index index.php;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
}
}
}
Code: Select all
location /zm {
proxy_pass http://192.168.1.14/zm;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl on;
proxy_redirect off;
}
Thanks!