访问wp-admin时,WordPress错误重定向

时间:2017-01-18 17:19:26

标签: php wordpress nginx admin panel

我有点问题。 现在,我将我的WordPress站点从Apache2迁移到Nginx。 一切正常,但不是管理面板。

当我尝试访问' / wp-admin'我有以下重定向:

  

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

之后会出现一个空白页面而没有其他内容。 我检查了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;
}

2 个答案:

答案 0 :(得分:0)

尝试删除以下行:

declare
  input_data my_table.my_column%type;
begin
  select my_column into input_data from my_table where /* some predicate(s) */;
end;
/

答案 1 :(得分:0)

好的,我找到了解决方案。 我在wp-config.php中打开了DEUB模式。某些插件中的配置不正确,所以我更改了它。

无论如何,感谢你的关注。

相关问题