mirror of
https://github.com/tschettervictor/bsd-apps.git
synced 2026-01-03 11:18:38 +01:00
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen 443 ssl;
|
|
ssl_certificate /usr/local/etc/ssl/cert.pem;
|
|
ssl_certificate_key /usr/local/etc/ssl/key.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers TLSv1.2:!aNULL:!eNULL;
|
|
ssl_prefer_server_ciphers on;
|
|
server_name _;
|
|
root /usr/local/www/zoneminder;
|
|
index index.php;
|
|
|
|
location = / {
|
|
return 302 /zm/;
|
|
}
|
|
|
|
location /cgi-bin/nph-zms {
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock;
|
|
}
|
|
|
|
location /zm/cache {
|
|
alias /var/cache/zoneminder;
|
|
}
|
|
|
|
location /zm {
|
|
alias /usr/local/www/zoneminder;
|
|
|
|
location ~ \.php$ {
|
|
if (!-f $request_filename) { return 404; }
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
|
fastcgi_index index.php;
|
|
fastcgi_pass unix:/var/run/php-fpm.sock;
|
|
}
|
|
|
|
location ~ \.(jpg|jpeg|gif|png|ico)$ {
|
|
access_log off;
|
|
expires 33d;
|
|
}
|
|
|
|
location /zm/api/ {
|
|
alias /usr/local/www/zoneminder;
|
|
rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;
|
|
}
|
|
}
|
|
}
|