From fb39c0469065f69aef079f249aef6a9f6585e5b3 Mon Sep 17 00:00:00 2001 From: Giulio Date: Thu, 21 May 2020 13:09:06 +0200 Subject: [PATCH] Wotking nginx php-fpm conf --- conf/etc/nginx/nginx.conf | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/conf/etc/nginx/nginx.conf b/conf/etc/nginx/nginx.conf index 4cb9929..f94524e 100644 --- a/conf/etc/nginx/nginx.conf +++ b/conf/etc/nginx/nginx.conf @@ -1,7 +1,6 @@ user www-data; worker_processes 4; - events { worker_connections 1024; } @@ -12,26 +11,21 @@ http { default_type application/octet-stream; sendfile on; keepalive_timeout 65; - gzip on; server { listen 80; server_name localhost; location / { - root html; + root /var/www/html; index index.html index.php; - try_files $uri $uri/ =404; } location ~ \.php$ { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - try_files $fastcgi_script_name =404; - set $path_info $fastcgi_path_info; - fastcgi_param PATH_INFO $path_info; - fastcgi_index index.php; - include fastcgi.conf; - fastcgi_pass unix:/var/run/php-fpm.sock; + fastcgi_pass unix:/var/run/php-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name; + include fastcgi_params; } }