2023-01-17 11:10:21 +03:00
|
|
|
server {
|
|
|
|
listen 80 default;
|
|
|
|
|
|
|
|
server_name localhost;
|
|
|
|
|
|
|
|
client_max_body_size 108M;
|
|
|
|
|
|
|
|
access_log /var/log/nginx/application.access.log;
|
|
|
|
|
2023-07-10 16:18:44 +03:00
|
|
|
root /var/www/html;
|
2023-01-17 11:10:21 +03:00
|
|
|
|
2023-07-10 16:18:44 +03:00
|
|
|
index index.php index.html;
|
2023-01-17 11:10:21 +03:00
|
|
|
|
|
|
|
# try to serve file directly, fallback to index.php
|
2023-07-07 13:41:02 +03:00
|
|
|
|
2023-01-17 11:10:21 +03:00
|
|
|
location / {
|
2023-07-10 16:18:44 +03:00
|
|
|
try_files $uri $uri/ =404;
|
2023-01-17 11:10:21 +03:00
|
|
|
}
|
|
|
|
|
2023-07-07 13:41:02 +03:00
|
|
|
location ~ ^.+.php {
|
2023-01-17 11:10:21 +03:00
|
|
|
fastcgi_pass php-fpm:9000;
|
|
|
|
fastcgi_index index.php;
|
2023-07-07 13:45:48 +03:00
|
|
|
fastcgi_split_path_info ^(.+?.php)(/.*)$;
|
2023-01-17 11:10:21 +03:00
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
|
|
|
|
fastcgi_buffers 16 16k;
|
|
|
|
fastcgi_buffer_size 32k;
|
|
|
|
include fastcgi_params;
|
|
|
|
}
|
2023-07-10 16:18:44 +03:00
|
|
|
|
|
|
|
location ~ /\.ht {
|
|
|
|
deny all;
|
|
|
|
}
|
2023-01-17 11:10:21 +03:00
|
|
|
}
|