forked from exozyme/nginx
44 lines
1.4 KiB
Text
44 lines
1.4 KiB
Text
|
server {
|
||
|
listen 80;
|
||
|
server_name 192.168.1.13;
|
||
|
|
||
|
root /srv/http;
|
||
|
index index.php;
|
||
|
|
||
|
location /zabbix {
|
||
|
if ($scheme ~ ^http:){
|
||
|
rewrite ^(.*)$ https://$host$1 permanent;
|
||
|
}
|
||
|
alias /srv/http/zabbix;
|
||
|
index index.php;
|
||
|
error_page 403 404 502 503 504 /zabbix/index.php;
|
||
|
|
||
|
location ~ \.php$ {
|
||
|
if (!-f $request_filename) { return 404; }
|
||
|
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
|
||
|
# ";
|
||
|
}
|
||
|
|
||
|
location ~ \.(jpg|jpeg|gif|png|ico)$ {
|
||
|
access_log off;
|
||
|
expires 33d;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|