SHARE
TWEET

zoneminder-nginx.conf

Nocifer Oct 5th, 2018 (edited) 575 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen localhost:80;
  3.     server_name localhost;
  4.  
  5.     root /usr/share/zoneminder/www;
  6.  
  7.     index index.php;
  8.  
  9.     access_log /usr/share/zoneminder/http_access.log;
  10.     error_log /usr/share/zoneminder/http_error.log;
  11.    
  12.     location /cgi-bin {
  13.         alias /usr/lib/zoneminder/cgi-bin;
  14.        
  15.         include fastcgi_params;
  16.            
  17.         fastcgi_param SCRIPT_FILENAME $request_filename;
  18.         fastcgi_param HTTP_PROXY "";
  19.            
  20.         fastcgi_pass unix:/var/run/fcgiwrap.socket;
  21.     }
  22.    
  23.     location /zm/cache {
  24.         alias /var/cache/zoneminder/cache;
  25.     }
  26.  
  27.     location ~ /zm/api/(css|img|ico) {
  28.         rewrite ^/zm/api(.+)$ /api/app/webroot/$1 break;
  29.         try_files $uri $uri/ =404;
  30.     }
  31.  
  32.     location /zm {
  33.         alias /usr/share/zoneminder/www;
  34.  
  35.         try_files $uri $uri/ /index.php?$args =404;    
  36.  
  37.         location /zm/api {
  38.             rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;
  39.         }
  40.    
  41.         location ~ \.php$ {
  42.             include fastcgi_params;
  43.            
  44.             fastcgi_param SCRIPT_FILENAME $request_filename;
  45.             fastcgi_param HTTP_PROXY "";
  46.                
  47.             fastcgi_index index.php;
  48.        
  49.             fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  50.         }
  51.     }
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top