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?