summarylogtreecommitdiffstats
path: root/zoneminder-nginx.conf
blob: 33fe7ab94d13b21d34760c872cd14cd3edd398ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
server {
    listen localhost:8095;
    server_name localhost;
    
    root /srv/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 {
            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;
        }
    }
}