【发布时间】:2017-07-21 11:37:44
【问题描述】:
我在 centos 7 上将我的网络服务器 apache2 切换到 nginx,现在主 index.php 显示一个空白页面,但 wp-admin 工作正常。在 Web 控制台中,我可以看到 200 响应。我启用了 wp 调试但没有运气。这是我的主机文件
server {
root /var/www/html;
index index.php index.html index.htm;
server_name new-site.com;
location = /favicon.ico {
log_not_found off;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
【问题讨论】: