XF 2.2 Moved Forums to new server; Admin page stuck in redirect loop

SuperMario630

New member
I moved my forums to a new host, basically looking at these instructions:

In short, I copied the forums directory and uploaded it to the new server, and backed up the data base and imported it on the new server. I also updated the config.php file with the new values.

The domain and URL have remained the same, but what has changed is that I went from an Apache server to Nginx.

Here is the issue I'm facing. The forum itself appears to be displaying data okay, but it's currently set to inactive. Whenever I try to access the admin page, I get stuck in a 301 redirect loop.

This is my Nginx routing rule:

location /community/ {
try_files $uri $uri/ /community/index.php?$uri&$args;
index index.php index.html;
}

Has anyone faced a similar issue?
 
I didn't see any errors being printed to the general php log, but I did find this in the nginx access log, which is interesting:

47.128.57.220 - - [05/Oct/2023:13:00:57 -0700] "GET /community/forums/-/new-posts?f=610562&page=2 HTTP/2.0" 301 162 "-" "Mozilla/5.0 (compatible; Bytespider; spider-feedback@bytedance.com) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.0.0 Safari/537.36"

Nginx appears to be logging everything as a 301 redirect, even though the user is seeing a 200. Do you think whatever is causing this could be causing the issue with admin.php redirecting endlessly? All other pages on the site get a 200, but NGINX logs everything as a 301.
 
I didn't see any errors being printed to the general php log, but I did find this in the nginx access log, which is interesting:

47.128.57.220 - - [05/Oct/2023:13:00:57 -0700] "GET /community/forums/-/new-posts?f=610562&page=2 HTTP/2.0" 301 162 "-" "Mozilla/5.0 (compatible; Bytespider; spider-feedback@bytedance.com) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.0.0 Safari/537.36"

Nginx appears to be logging everything as a 301 redirect, even though the user is seeing a 200. Do you think whatever is causing this could be causing the issue with admin.php redirecting endlessly? All other pages on the site get a 200, but NGINX logs everything as a 301.

Find the request for admin.php in your access.log and post it here, should say 301 something.
 
Back
Top Bottom