In this recipe, you will learn how to update the HAProxy configuration file to configure a different heath check URL.
To complete this recipe, you will need rhc
installed on your machine. This recipe will utilize the application created in the Creating scalable applications recipe.
Perform the following steps:
Open a command-line terminal and navigate to the application directory created in the Creating scalable applications recipe.
SSH into the main application gear using the
rhc ssh
command, as follows:$ rhc ssh --app jobstore
Change the directory to the
haproxy
configuration directory, as follows:$ cd haproxy/conf
Now, open the
haproxy.cfg
file using VIM, and remove the following content:option httpchk GET /
In its place, insert the following content:
option httpchk GET /api/v1/ping
Finally, restart the HAProxy cartridge from your local machine using the
rhc
command-line client:$ rhc restart-cartridge --cartridge...