“Sorry you’re not allowed to access this page” after migrating to https
-
Hello,
I recently upgraded my wordpress to start using ssl certificates. In my database I also rewrote the urls to serve https files instead of http files. For the most mart the site works as expected, however I’m not able to access the admin panel even after I log in correctly using the user that has administrative privileges. It always redirects me to an error page with the following message
“Sorry you’re not allowed to access this page”
I tried to create a new admin user and log in with that but the result was the same.
The wiered thing though is that when I switched back to http(non-ssl server) it started working perfectly again. I was able to login as an admin without any hitch.
In my wp-config.php I made the following changes:-
define(‘FORCE_SSL_ADMIN’, true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)
$_SERVER[‘HTTPS’]=’on’;Here is a link to the nginx configuration files that I’m using for my application.
Can you please help me understand what might be causing this issue?
Thanks,
Akshat
- The topic ‘“Sorry you’re not allowed to access this page” after migrating to https’ is closed to new replies.