M
M
MSAFT2018-08-02 15:05:00
Nginx
MSAFT, 2018-08-02 15:05:00

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
}

All pages with the .php extension are opened with the so-called blank_page, although the picture or text files through domain/text.txt open without problems.
It does not write errors to the logs, there are no errors. Memory expanded on the server.
On Windowskom Openserver, the site opens without any problems.
I don't know where to dig

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MSAFT, 2018-08-03
@MSAFT

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

L
linux81, 2018-08-02
@linux81

Check short_open_tag in php. Must be on.

I
Ilya Oblomov, 2018-08-03
@Oblomow

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 question

Ask a Question

731 491 924 answers to any question