nginx/zabbix.conf

45 lines
1.2 KiB
Text
Raw Normal View History

2021-05-22 18:30:52 +00:00
server {
listen 80;
listen [::]:80;
2021-05-25 03:24:31 +00:00
server_name 192.168.1.13;
2021-05-22 18:30:52 +00:00
root /usr/share/webapps/zabbix;
2021-05-25 03:24:31 +00:00
index index.php;
2021-05-22 18:30:52 +00:00
location /zabbix/ {
2021-05-25 03:24:31 +00:00
if ($scheme ~ ^http:) {
rewrite ^(.*)$ https://$host$1 permanent;
}
2021-11-30 14:33:59 +00:00
alias /usr/share/webapps/zabbix/;
2021-05-25 03:24:31 +00:00
index index.php;
error_page 403 404 502 503 504 /zabbix/index.php;
2021-05-22 18:30:52 +00:00
2021-05-25 03:24:31 +00:00
location ~ \.php$ {
if (!-f $request_filename) {
return 404;
2021-05-22 18:30:52 +00:00
}
2021-05-25 03:24:31 +00:00
expires epoch;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_intercept_errors on;
fastcgi_read_timeout 120s;
fastcgi_send_timeout 120s;
fastcgi_index index.php;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
# fastcgi_param PHP_VALUE "
# max_execution_time=300
# max_input_time=300
# post_max_size=16M
# ";
}
2021-05-22 18:30:52 +00:00
2021-05-25 03:24:31 +00:00
location ~ \.(jpg|jpeg|gif|png|ico)$ {
access_log off;
expires 33d;
2021-05-22 18:30:52 +00:00
}
2021-05-25 03:24:31 +00:00
}
2021-05-22 18:30:52 +00:00
}