Spring naar de hoofdinhoud

HAProxy Simple Configuration for local webserver

Parameters for this setup:

Local webserver is on ip address 192.168.1.200 and uses port 80

 

 

  1. Define a Real server: name Internal_www, IP: 192.168.1.200, port 80, no ssl

afbeelding.png

 

 

Define a Virtual service->Backend Pool: name pool_www, add server Internal_www (remember to press TAB after entering server name)

Define a condition: Name e.g. www, Host matches, Host string = www.domain.com

Define a rule: Name redirect_www, Select Conditions: www, HAProxy function: Use specified Backend, pool_www

Define a Virtual Service->Public Service: Name front_443, Listen address: 196.44.xxx.xxx:443 (TAB), enable ssl-offloading, default backend pool: pool_www (TAB), certificate: your Let's Encrypt cert, Advanced settings: Select rules: redirect_ww