我把我的web服務器apache2切換到centos 7上的nginx,現在主要index.php顯示一個空白頁面,但wp-admin工作正常。在Web控制檯中,我可以看到200個響應。我啓用了wp調試,但沒有運氣。這裏是我的主機文件wordpress空白頁與nginx
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;
}
}
千恩萬謝。我得到了解決方案,現在它的工作我改變了配置,並在我的答案更新解決方案 – abaid778