2017-01-18 4 views
0

少し問題があります。 今、WordPressサイトをApache2からNginxに移行しています。 すべては正常に機能しますが、管理パネルでは機能しません。空白のページが表示されます。その後wp-adminにアクセスしている間にWordPressのリダイレクトが間違っています

http://domain.com/wp-login.php?redirect_to=http%3A%2F%2Fdomain.com%2Fwp-admin%2F&reauth=1

何もない:

私は '/ WP-adminの' にアクセスしようとする

は、私は、次のリダイレクトを持っています。 私はPHPの設定をチェックし、サンプルtest.phpは何かを印刷しているので動作します。 私は間違っていますか?

は、ここに私のnginxの設定ファイルである:

server 
{ 
listen 155.123.12.222:80; 
server_name domain.com www.domain.com ; 
access_log /var/log/nginx/domains/domain.com.log; 
access_log /var/log/nginx/domains/domain.com.bytes bytes; 
error_log /var/log/nginx/domains/domain.com.error.log; 
root /home/admin/domains/domain.com/public_html; 
index index.php index.html index.htm; 

location/{ 
    index index.php; 
    try_files $uri $uri/ /index.php?q=$uri&$args; 
} 

rewrite /wp-admin$ $scheme://$host$uri/ permanent; 

location /wp-admin { 
    index index.php index.html index.htm; 
    try_files $uri /wp-admin/index.php?q=$uri&$args; 
} 

location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { 
    expires 24h; 
    log_not_found off; 
} 


location ~ /\. { access_log off; log_not_found off; deny all; } 

location ~ \.php$ 
{ 
    try_files $uri =404; 
    fastcgi_split_path_info ^(.+\.php)(/.+)$; 
    include /etc/nginx/fastcgi_params; 
    fastcgi_index index.php; 
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
    include /etc/nginx/nginx_limits.conf; 
     if (-f $request_filename) 
     { 
      fastcgi_pass unix:/usr/local/php56/sockets/admin.sock; 
     } 
} 

location ~ /\.ht 
{ 
    deny all; 
} 
include /etc/nginx/webapps.conf; 
} 
+0

通常、ワードプレスの空白のページは、エラーがスローされたことを意味します。エラーログには何かがありますか? – dsadnick

+0

いいえ、エラーログはクリアです。アクセスログのアクセスに関する情報があります。最初に/ wp-adminにリダイレクトし、次にリダイレクトについて他に何もない。 – Krylion

+0

私はこのプロジェクトをApache2でBitnamiで作成していました。たぶん、いくつかの設定が悪いですか? – Krylion

答えて

0

次の行を削除してください:

rewrite /wp-admin$ $scheme://$host$uri/ permanent; 
location /wp-admin { 
    index index.php index.html index.htm; 
    try_files $uri /wp-admin/index.php?q=$uri&$args; 
} 
+0

Nginxを再起動しても同じ問題が解消されました。 – Krylion

0

[OK]を、私は解決策を見つけました。 wp-config.phpでDEUBモードを有効にしました。一部のプラグインで設定が間違っていたので、変更しました。

とにかく、あなたの注目の人のためにありがとう。

関連する問題