root.SX

Personal blog of a sysadmin

Archives

  • April 2025
  • May 2024
  • June 2023
  • April 2016
  • August 2015
  • February 2015
  • December 2014
  • September 2014
  • March 2014
  • October 2013
  • May 2013
  • February 2013
  • January 2013

Meta

  • Log in

Month: December 2014

Having a WordPress blog behind a Nginx reverse proxy secured with SSL

2014-12-19 by root·0 Comments

Add to your wp-config.php file on the backend server the following lines :

if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
       $_SERVER['HTTPS']='on';

And add to your Nginx reverse proxy config file this line :

proxy_set_header X-Forwarded-Proto https;

P.S. if you have some mixed content (insecure) just install the plugin WordPress HTTPS (SSL)

Source: WordPress

Proudly powered by WordPress. Theme: Flat 1.7.11 by Themeisle.
Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site. Si vous continuez à utiliser ce dernier, nous considérerons que vous acceptez l'utilisation des cookies.