Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
thefarang Posted November 12, 2020 Posted November 12, 2020 I just moved everything over from Apache2 to NGINX and everything seems to work except I cannot log into the Admin section. I get the following error when I try to access https://www.mysite.com/admin/: Sorry, there is a problem The page you requested does not exist Error code: 1S160/2 I do see the 404 in the access logs. If I type in https://www.mysite.com/admin/index.php it redirects me to https://www.mysite.com/login/?error=&ref= gives me a login page. When I login in, it redirects me to the homepage of the forum. Returning to https://www.mysite.com/admin/index.php redirects me to the login page again. I've tried this on several different browsers. Even on mobile using FireFox Focus to eliminate any browser cache issues. If I shut down NGINX and fire up Apache2 again, no problems, I can log in. Here's the relevant part of my NGINX config file (I was trying to keep it absolute minimal until I got everything working - I'll add in compression, restrictions, etc later): index index.php; location / { try_files $uri /index.php?$args; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_pass unix:/var/run/php-fpm/php7.2-fpm.sock; fastcgi_index index.php; include fastcgi_params; } Any thoughts?
Solution thefarang Posted November 13, 2020 Author Solution Posted November 13, 2020 Just an update in case anyone else has this issue. I changed: try_files $uri /index.php?$args; to try_files $uri $uri/ /index.php; I can log into /admin now. Not sure everything is working yet (still testing) but that overcomes the first hurdle 🙂 The Old Man 1
Recommended Posts