Nginx, Varnish and Wordpress with SSL Termination
TL;DR Assuming you’ve already got your reverse proxy running, in wp-config.php add the following: 1 2 3 4 5 6 7 8 9 <?php /** TLS/HTTPS fixes **/ // 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) { // update HTTPS server variable to always 'pretend' incoming requests were // performed via the HTTPS protocol. $_SERVER['HTTPS']='on'; } If you’re getting desperate:...