Configuring Reverse Proxy over AWS instances

Configuring Reverse Proxy over AWS instances

What is AWS?

Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow. Running web and application servers in the cloud to host dynamic websites.

Amazon EC2

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment.

TASK 12.2 Description

          Use Ansible playbook to Configure Reverse
          Proxy i.e. Haproxy and update it's configuration
          file automatically on each time new Managed node
          (Configured With Apache Webserver) join the inventory.
          Configure the setup over AWS
          using instance over there.

Ansible Playbook to configure Reverse Proxy over AWS instances

No alt text provided for this image
No alt text provided for this image
#inventory file
 vim ip.txt
No alt text provided for this image
#Running the playbook
 ansible-playbook haproxy.yml

No alt text provided for this image
#Checking the haproxy.cfg file to see if the webservers are added or not
 vim /etc/haproxy/haproxy.cfg
No alt text provided for this image
#Going to the Loadbalancer IP using port 8080 to check the connectivity
 52.87.237.193:8080/web.php
No alt text provided for this image

So as we can see, IP 52.87.237.193 is working as the loadbalancer. The task is successfully completed!

Thank you for reading my article, hope this helps you!

To view or add a comment, sign in

More articles by Abhijit Mandal

Insights from the community

Others also viewed

Explore topics