Configuring Reverse
Proxy using Ansible playbook | Task 12.1 | Arth





  • Firstly we are going to configure backend server.
    There we install “httpd” & “php” packages.
  • Now write a ansible task for copying php web page to target node & start httpd service.
  • Now we are going to configure Proxy server.
    First we install HAproxy software & then we transfer “haproxy.cfg” file from local host to proxy server.


  • Now let us run the playbook.
  • Let’s go inside each OS & check if we successful in our tasks.
  • So we can see all configuration is done, now let’s if our webpage is running properly or not.


  • The haproxy config file is dynamic so every time we run the playbook it scan the changes in the inventory & if it found any new managed node it include it as backend server.
  • If you want to do this task on EC2 instances you can do it by configuring the inventory as dynamic. For this configuration you can go to my another blog, link is given below.




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store