Hi,
I see you are using Nginx. Do you use Apache (or any other web server) also behind Nginx? Your issue is looking like you are off-loading your SSL traffic on Nginx and WordPress has no idea about that and is trying to server plain HTTP traffic. Check how you configured your Home and SiteURL values and additionally try to add this to your wp-config.php file:
if ($_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’) $_SERVER[‘HTTPS’]=’on’;
Yes I’m using Apache and it seems everything is okay when I check Home and SiteURL (when i join into Home page it shows me the right link “https://centroveterinariospecialisticolocovet.it/”, but it can’t load it.
Then yes; neither Apache, nor WordPress are not “aware” Nginx is off-loading SSL traffic, so you need to tell the this is the case. Put the following at the bottom of the wp-config.php file and I think it should solve your issue:
define(‘FORCE_SSL_ADMIN’, true);
define(‘FORCE_SSL_LOGIN’, true);
if ($_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’)
$_SERVER[‘HTTPS’]=’on’;
Even with this code I’m having the same problem, it seems an Error 301 looking logs only for that link
Ok problem solved, WP_Home and WP_SiteURL were written in CAPS. Now Homepage works fine.
-
This reply was modified 6 years, 9 months ago by
giancarlo15.