Hello guys, i want to put multible domains behind one public ip, so i have to use a reverse proxy. I’m combining pfsense 2.4.4 with the HAproxy. 

Here’s what i’ve got:

  • WordPress Webserver, domain.ch
  • WordPress Webserver, otherdomain.ch
  • Nextcloud 14, sub.domain.ch

First, install the HAproxy package


——————————————————————————————————-

Create the needed Firewall rules

——————————————————————————————————-

Enable the HAproxy

——————————————————————————————————-

Configure the stats port

——————————————————————————————————-

Create your backends

——————————————————————————————————-

Backend overview for wordpress webserver

——————————————————————————————————-

Backend overview for nextcloud webserver
Change the timeout and health check method

——————————————————————————————————-

Here is the frontend overview

——————————————————————————————————-

Configure the external IP and port

——————————————————————————————————-

Frontend type is http/https(offloading)

——————————————————————————————————-

Create the frontend ACLs – type each domain

——————————————————————————————————-

Create the frontend actions – Connect each ACL with the correct backend webserver

——————————————————————————————————-

Control the stats – each server needs to be up

——————————————————————————————————-

Heres the needed wordpress config

——————————————————————————————————-

Hers the needed nextcloud config


Leave a Reply

avatar
  Subscribe  
Notify of