Last active
October 15, 2024 16:26
-
-
Save Gottfr1ed/2c987d3af75cc3a5f168deb75da67cad to your computer and use it in GitHub Desktop.
zoneminder config for nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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