最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

redirect - I get redirected too many times only in wp-admin?

programmeradmin0浏览0评论

I am trying to run wordpress in a subdirectory blog in my rails app, I used this nginx config as:

server {
    listen 80;
    server_name _;

  passenger_ruby /usr/local/bin/ruby;
  passenger_enabled on;
  rails_env production;
  location ^~ /assets/ {
root /var/www/example/current/public;
    gzip_static on;
    expires max;
    add_header Cache-Control public;

  }

location /blog {
  root /var/www/example/current;
  index  index.html index.htm index.php;
  try_files $uri $uri/ /index.php?$args;

  location ~ \.php$ {
    fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
}

}

My folders looks like this:

/rails_app/
/rails_app/blog/
/rails_app/blog/wp-admin/

where blog directory has wordpress files I don't have any route starts with blog at rails app.

There is no redirect loop for frontend, but only at wp-admin

here in my wp-config.php I have:

define('WP_HOME','');
define('WP_SITEURL','');

$_SERVER['HTTPS']='on';
define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);

any idea? how to debug this issue?

发布评论

评论列表(0)

  1. 暂无评论