2017-03-01 10 views
1

私はwebserver apache2をcentos 7でnginxに切り替えましたが、現在のindex.phpでは空白のページが表示されますが、wp-adminはうまくいきます。 Webコンソールでは、私は200応答を見ることができます。私はwp debugを有効にしましたが、運はありません。ここに私のホストファイルですnginxでwordpressの空白ページ

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; 
     } 
    } 

答えて

0

このサイトは私のために働いている:new-staging.opploans.com あなたがCDNを使用している場合、コンテンツを削除し、再度試して、あなたのブラウザ専用のキャッシュをクリーンアップしてみたりしてください。私はこれが私のために設定を働いている解決策を得たグーグルの

+0

多くのおかげでinclude fastcgi_params;を変更しました。私は解決策を得て、現在は私の設定を変更し、私の答えで解決策を更新しました – abaid778

3

非常に多くの時間がinclude fastcgi.conf;

location ~ \.php$ { 
    try_files $uri =404; 
    fastcgi_split_path_info ^(.+\.php)(/.+)$; 
    include fastcgi.conf;  
    fastcgi_index index.php; 
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
    #include fastcgi_params; 
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; 
} 

}

+0

これはうまくいきました。ありがとうabaid778 –

関連する問題