• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

securitywing

How to Setup SSL in AWS application load balancer for WordPress

by wing

How to setup SSL in AWS application load balancer for WordPress.

AWS application load balance helps to off load the web server by taking the responsibility of encrypting and decrypting the SSL connection. To implement SSL in WordPress you need to apply the SSL certification only on the load balancer. However, you still need to add the certificate in the server if you want https traffic between the load balancer and the web server. This post only focuses on how to setup SSL in AWS application load balancer for WordPress and make a few configuration changes on the wp-config file to get WordPress working with SSL.

Step 1: Create a load balancer

At first, you need to create an ALB (application load balancer) and then add two listeners-one is for https and another is for http. You do not require creating http listener if you do not want to redirect the users who type http in the browser instead of https. However, it is a good idea to redirect http to https since AWS ALB now support redaction option on the load balancer.

If you have not created a load balancer, you can create on the load balancer in your AWS account and select “application load balancer”. Next, add the http and https listener as shown below.

create an application load balancer in AWS

Click on “configure security settings” and upload a SSL certificate of choose one from the ACM that you already upload on your AWS account and keep the security policy to the default one ELBSecurityPolicy-2016-08 and click on “configure security groups” and either create one or choose an existing security group.

 

Setup http to https direction in Listener id HTTP:80

Once you create the load balancer, you need to go back to the load balancer and click on the listener id HTTP:80 and the default action to “redirect to” and add the port 443.

http to https redirection setup in ALB

Step 2: modify the wp-config file

Once you are done with the load balancer, you need to open the wp-config file and at the following lines at the beginning of the wp-config.php file

define(‘WP_HOME’,’https://yourdomain.com’);

define(‘WP_SITEURL’,’https://yourdomain.com’);

if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)

$_SERVER[‘HTTPS’]=’on’;

 

Related posts:

  1. How to install a new Godaddy SSL Wildcard Certificate
  2. How to Renew Self-Signed SSL Certificate with OpenSSL Tool in Linux
  3. HSRP Configuration(Hot Standby Routing Protocol)
  4. MySQL Security Settings Checklist and Issues

Filed Under: Internet Security and Safety Tagged With: application load balancer, AWS, SSL

Primary Sidebar

Please help us sharing

Categories

  • AWS
  • Basics
  • Containers
  • Cryptocurrency
  • Cyber
  • Internet Security and Safety
  • IS Audit
  • IT Security Exams
  • Law & Human Rights
  • Network Security Tips
  • Off Track
  • Social Media Governance
  • Tech Comparisons
  • Tech Stack Suitability
  • Telecom
  • Tutorial

CISSP Sample Test

Take a CISSP Sample Test

CISA Sample Test

CISA IT governance Sample test

Please Follow Us

Contact us for Ads

Go to Contact Form

Search

Footer

Copyrights

Protected by Copyscape Duplicate Content Detection Software

Securitywing.com reserves the copyrights of all of its published articles.No contents of this site is permitted to be published to anywhere else in the Internet.If any contents are found in any other websites, securitywing reserves the rights to file a DMCA complaint. But you have the right to use the link of any relevant article of this site to point from your website if you consider that it might improve the quality of your article.

Tags

audit AWS backup basics browser check cisco cloud computer configuration cyber data database email gmail hsrp ids iis informaiton internet kubernetes linux load balancing malware microsoft network protection redundancy risk router security security tips server social media SSL switch test tools vpn vrrp web webserver website windows wordpress

Copyright © 2010-2025 ·All Rights Reserved · SecurityWing.com