zoneminder/distros/redhat/nginx/zoneminder.nginx.conf.in

58 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-12-01 23:58:12 +08:00
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name = localhost $hostname;
ssl_certificate "/etc/pki/tls/certs/localhost.crt";
ssl_certificate_key "/etc/pki/tls/private/localhost.key";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers PROFILE=SYSTEM;
ssl_prefer_server_ciphers on;
# Auto redirect to server/zm when no url suffix was given
location = / {
return 301 zm;
}
2018-12-01 23:58:12 +08:00
location /cgi-bin-zm {
gzip off;
alias "@ZM_CGIDIR@";
2018-11-05 07:11:19 +08:00
2018-12-01 23:58:12 +08:00
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/run/fcgiwrap/fcgiwrap-nginx.sock;
}
2018-12-01 23:58:12 +08:00
location /zm/cache {
alias "@ZM_CACHEDIR@";
}
2018-12-01 23:58:12 +08:00
location /zm {
gzip off;
alias "@ZM_WEBDIR@";
2018-12-01 23:58:12 +08:00
index index.php;
location ~ \.php$ {
try_files $uri =404;
expires epoch;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_index index.php;
fastcgi_pass unix:/run/php-fpm/www.sock;
}
location ~ \.(jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 33d;
}
location /zm/api/ {
alias "@ZM_WEBDIR@";
rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;
}
}
2018-12-01 23:58:12 +08:00
}