Eu preciso de ajuda, por favor.
Recentemente, decidi migrar meus sites para
-
do Debian 8 + Apache 2.4 + mod_php + Varnish
- para o Debian 9 + Nginx + php7.1-fpm + Varnish
Eu fiz a migração com sucesso de uma única instalação wordpress, funciona bem. Em seguida, tentei migrar uma instalação multisite.
- As páginas de frontend do Blog1 e do Blog2 funcionam bem.
- Mas as páginas do administrador de rede e do administrador do site dão 500 erros.
Eu usei config para subdomínios do WP Codex, mas na verdade eu uso 2 domínios diferentes nesses dois blogs.
O que eu tentei:
- Aumentando o limite de memória do php para 128 e o limite da memória do wp-config para 64
- Excluindo o verniz da configuração
- Adicionando o mapa {} às regras nginx conf e WPMU do WP Codex
- Desativando plug-ins e temas
WP-admin desse multisite ainda inacessível
1. nginx.conf
user www-data www-data;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
sendfile on;
sendfile_max_chunk 128k;
tcp_nopush on;
tcp_nodelay on;
reset_timedout_connection on;
client_header_timeout 3;
client_body_timeout 5;
send_timeout 3;
client_header_buffer_size 2k;
client_body_buffer_size 256k;
client_max_body_size 12m;
access_log off;
include /etc/nginx/conf.d/*.conf;
}
2. frontend.conf
server {
listen 443 ssl;
server_name profispb.com www.profispb.com xn--e1ajhifc2d.xn--p1ai www.xn--e1ajhifc2d.xn--p1ai;
keepalive_timeout 60 60;
gzip on;
gzip_comp_level 1;
gzip_min_length 512;
gzip_buffers 8 64k;
gzip_types text/plain;
gzip_proxied any;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:TLS:2m;
ssl_session_timeout 2m;
ssl_certificate XXXXXXXXXXXXXXXXXXXXXX(hidden);
ssl_certificate_key XXXXXXXXXXXXXXXXXXXXXX(hidden);
#ssl_dhparam /etc/ssl/sslforfree/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_ciphers XXXXXXXXXXXXXXXXXX(hidden)
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains';
location / {
proxy_pass http://127.0.0.1:6081/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
}
}
3. Backend.conf
map $http_host $blogid {
default 0;
xn--e1ajhifc2d.xn--p1ai 1;
profispb.com 2;
}
server {
server_name profispb.com www.profispb.com xn--e1ajhifc2d.xn--p1ai www.xn--e1ajhifc2d.xn--p1ai;
listen 127.0.0.1:81;
root /var/www/vetka/profispb.com;
index index.php;
gzip on;
gzip_comp_level 9;
gzip_min_length 512;
gzip_buffers 8 64k;
gzip_types text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
gzip_proxied any;
location / {
try_files $uri $uri/ /index.php$args;
}
location ~ \.php$ {
try_files $fastcgi_script_name =404;
fastcgi_keep_conn on;
include /etc/nginx/fastcgi_params;
fastcgi_read_timeout 3600s;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 128k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
}
#WPMU Files
location ~ ^/files/(.*)$ {
try_files /wp-content/blogs.dir/$blogid/$uri /wp-includes/ms-files.php?file=$1 ;
access_log off; log_not_found off; expires max;
}
#WPMU x-sendfile to avoid php readfile()
location ^~ /blogs.dir {
internal;
alias /var/www/vetka/profispb.com/wp-content/blogs.dir;
access_log off; log_not_found off; expires max;
}
}
Exemplo de log de erros (repete)
2017/12/19 22:28:05 [error] 11039#11039: *6 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/vetka/profispb.com/wp-content/plugins/revslider/includes/framework/base-admin.class.php:71
Stack trace:
#0 /var/www/vetka/profispb.com/wp-content/plugins/revslider/admin/revslider-admin.class.php(552): RevSliderBaseAdmin::addMetaBox('Revolution Slid...', '', Array, NULL)
#1 /var/www/vetka/profispb.com/wp-content/plugins/revslider/admin/revslider-admin.class.php(73): RevSliderAdmin->addSliderMetaBox()
#2 /var/www/vetka/profispb.com/wp-content/plugins/revslider/admin/revslider-admin.class.php(44): RevSliderAdmin->init()
#3 /var/www/vetka/profispb.com/wp-content/plugins/revslider/revslider.php(165): RevSliderAdmin->__construct('/var/www/vetka/...')
#4 /var/www/vetka/profispb.com/wp-settings.php(305): include_once('/var/www/vetka/...')
#5 /var/www/vetka/profispb.com/wp-config.php(101): require_once('/var/www/vetka/...')
#6 /var/www/vetka/profispb.com/wp-load.php(37): require_once('/var/www/vetka/...')
#7 /var/www/" while reading response header from upstream, client: 127.0.0.1, server: profispb.com, request: "GET /wp-admin/ HTTP/1.0", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "xn--e1ajhifc2d.xn--p1ai", referrer: "https://xn--e1ajhifc2d.xn--p1ai/"