Skip to content

Instantly share code, notes, and snippets.

@Gottfr1ed
Last active October 15, 2024 16:26
Show Gist options
  • Select an option

  • Save Gottfr1ed/2c987d3af75cc3a5f168deb75da67cad to your computer and use it in GitHub Desktop.

Select an option

Save Gottfr1ed/2c987d3af75cc3a5f168deb75da67cad to your computer and use it in GitHub Desktop.
zoneminder config for nginx
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name = zoneminder;
location = / {
return 301 zm;
}
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:/run/fcgiwrap.socket;
}
location /zm/cache {
alias /var/cache/zoneminder;
}
location /zm {
gzip off;
alias /usr/share/zoneminder/www;
index index.php;
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_intercept_errors on;
fastcgi_pass unix:/run/php/php-fpm.sock;
}
}
location ~ /\.ht {
deny all;
}
#error_log /var/log/nginx/error.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment