From 2f751c53e20f562910a56159534fd8b232860ea7 Mon Sep 17 00:00:00 2001 From: fanta Date: Sat, 6 Feb 2021 20:28:49 +0100 Subject: [PATCH] =?UTF-8?q?cambios=20php=C3=A7=C3=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wordpress_nginx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/wordpress_nginx b/wordpress_nginx index 0398c13..a544bd2 100644 --- a/wordpress_nginx +++ b/wordpress_nginx @@ -1,8 +1,3 @@ -upstream php { - server unix:/tmp/php-cgi.socket; - server 127.0.0.1:9000; -} - server { server_name domain.tld; root /var/www/wordpress; @@ -11,6 +6,8 @@ server { access_log /var/log/nginx/"$server_name"-access.log; error_log /var/log/nginx/"$server_name"-error.log; + server_tokens off; + location = /favicon.ico { log_not_found off; access_log off; @@ -27,12 +24,12 @@ server { } location ~ \.php$ { - #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini + try_files $uri =404; + fastcgi_index index.php; + fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; include fastcgi_params; - fastcgi_intercept_errors on; - fastcgi_pass php; - #The following parameter can be also included in fastcgi_params file - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {