Answer the question
In order to leave comments, you need to log in
Wordpress on NGINX opens white page. What to do?
map $uri $blogname{
~^(?P/[^/]+/)files/(.*) $blogpath ;
}
map $blogname $blogid{
default -999;
#Ref: wordpress.org/extend/plugins/nginx-helper
#include /var/www/wordpress/wp-content/plugins/nginx-helper/map.conf ;
}
server {
server_name domain;
root /srv/domain/;
index index.php;
error_log /var/log/nginx/domain.error.log;
location ~ ^(/[^/]+/)?files/(.+) {
try_files /wp-content/blogs.dir/$blogid/files/$2 /wp-includes/ms-files.php?file=$2 ;
access_logoff; log_not_found off; expires max;
}
#avoid php readfile()
location ^~ /blogs.dir {
internal;
alias /srv/domain/htdocs/wp-content/blogs.dir ;
access_logoff; log_not_found off; expires max;
}
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
location / {
try_files $uri $uri/ /index.php?$args ;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
try_files $uri =404;
include fastcgi_params;
}
#add some rules for static content expiry-headers here
}
Answer the question
In order to leave comments, you need to log in
I solved the problem like this: I
renamed the /plugins folder and still got an error, the problem was that php-curl was not installed
I don’t know what’s going on specifically with you, but if I saw the white page myself, I would first turn on the error output.
This can be done in the wp-config file or in .htaccess
If through wp-config, then put true instead of false in the
define('WP_DEBUG', true);
Although I admit that I forgot something, so just in case I’ll write more about .htaccess, where you need to add the lines:
php_flag display_errors on
php_flag display_startup_errors on
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question