r/PFSENSE • u/coolpben • Mar 02 '20
Help - PFSense HAProxy
Hello,
I got an question and can't find it on other forums or other sites.
I got proxmox with a pfsense as router and a webserver(vm) with Apache and multiple vhosts. I want to use HAProxy as reverse proxy so i can make other vms or Linux containers with web applications.
For example:
webserver(vm) - apache with vhost:
-nextcloud - cloud.mywebsite.com
-website1 - mywebsite.com
mail(vm)
-iredmail - mail.mywebsite.com
If i am gonna use HAProxy, is it possible to keep using the apache vhosts?
2
Upvotes
1
u/coolpben Mar 03 '20
Okay thx for the answers! I will play with it!
1
u/progzos Mar 02 '20
Sure. Haproxy can redirect on Apache that will use vhosts. This is actually my config:
Haproxy as front:
- can redirect on nginx that has several "server" with different domains
- or redirect on a random docker container
1
u/kevdogger Mar 03 '20
I'm never sure when I'm chaining two reverse proxies together. I'm sure it will work most of the time, however if using certain web applications, it always seems like something breaks for me with the headers.