Struggling with pfSense and HAProxy

Hello!

Let me guess, you're running into 503 errors when you try to go to your site? If HAProxy's stats page gives you the green "OK" then it's not pfSense or HAProxy, it's your web servers.

Why?

I was having this exact same issue on my web servers. The culprit, from my understanding, is that you need to turn off SSL on your webservers but still allow port 80 and 443 traffic.

If you're using Nginx, unfortunately I don't have a solution to recommend other than disabling/uninstalling it and installing/running Apache.

If you're using Apache, then nano/vi websites config(/etc/apache2/sites-enabled/www.example.com.conf) and make sure "SSLengine Off" is listed under VirtualHost 443. Example;

<VirtualHost *:80>
     #Domain Name
     ServerName www.example.com
     ServerAlias www.example.com

     ProxyRequests off
     ProxyPass / http://127.0.0.1:2369/
     ProxyPassReverse / http:/127.0.0.1:2369/

</VirtualHost>

<VirtualHost *:443>
    ServerName www.example.com
    ServerAlias www.example.com

    SSLengine off

    ProxyPass / http://127.0.0.1:2369/
    ProxyPassReverse / http:/127.0.0.1:2369/
    ProxyPreserveHost   On

    RequestHeader set X-Forwarded-Proto "https"

</VirtualHost>

I was fighting this for probably a week pulling my hair out thinking it was pfSense, but I ended up testing this on my dokuwiki server first(turnkey template, uses apache) and it worked perfectly, but my Ghost server(turnkey, uses nginx) had to have Nginx blown out and apache used instead.

Let me know if you have any questions. I've been meaning to make a blog post about this, but haven't had the time....

/r/homelab Thread