By denright
Hi,
I’ve been through the process of setting up some LXC containers running NGINX and then went through install of an LEMP stack on one of them, I have HAProxy set up to do TLS termination and have let’s encrypt certs set up so that I have SSL enabled.
I’ve now been through setting up MySQL and then wordpress install, but my wordpress installs don’t look right. For an example see here: https://benefitsofbamboo.com/
Can anyone tell me what is wrong?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
WordPress doesn’t handle proxies all that well, even if you are sending the correct headers over. I ran in to this issue when setting up a cluster for a client just last week.
A simple solution is to force SSL by modifying wp-config.php.
Find:
define('WP_DEBUG', false);
Directly below that, add:
if ( $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )
{
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
}
Save wp-config.php and reload the page.
Hi @denright
You need to modify your WordPress installation to run over https instead of http. https://benefitsofbamboo.com/wp-admin/options-general.php
You might need to modify posts and edit links and images to also use https. Or you could use a plugin like Better Search Replace to do it automatically. https://wordpress.org/plugins/better-search-replace/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.