idv-demo/nginx/default.bak.3.conf
2026-07-09 08:02:27 +00:00

35 lines
857 B
Text

server {
listen [::]:80 default_server;
root /var/www/html/public;
index index.php index.html;
charset utf-8;
server_name _;
#Logging
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log notice;
#handling Static files
# location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
# access_log off;
# expires max;
# }
# Support Clean (aka Search Engine Friendly) URLs
# location / {
# try_files $uri $uri/ /index.php?$args ;
# }
# Handling .php files
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}