Pfsense+Apache+Virtual hosts

  • I have several domains that are hosted on my server.
    Without Pfsense the virtual hosts in Apache work fine, but when I put the server behind pfsense, only the default page is displayed, no matter which domain (or ip) that I use to access.
    Apparently DNS request is not comming throught.
    Does anyone know what I have do?

  • Are you just doing port forwarding or are you using some form of reverse proxy or load balancer?

  • I am just doing port forwarding (Nat+Rule).

  • It should work fine then - are you testing from outside your network?

  • Yes, I am testing from another link, but I don´t understand what´s happening.
    Let me explain how my infrastructure is:
    Pfsense is runnig on VMWare server over CentOS (2 NICs on the server, 1 WAN, 1 LAN).
    PFsense have 1 valid IP and one from my network.
    I´m only NATing http and port 10000 for Webmin (It´s a new instalation).
    I really don´t know if something is missing.

  • I'd check the Apache log to see if it can help you work out what's going on.  It may well be that somehow it's no longer configured to correctly use name based virtual hosts (possibly you have some entries in /etc/hosts?).

  • has this been resolved? i have a very similar scenario.

    I have 1 IIS server and 1 Apache server behind a pfSense box with only 1 WAN IP.

    I have Virtual hosts configured in the Linux box and Host header names set in IIS.

    Local access, no problem because I have a local DNS server, but when accessed through the outside, it gets confused as if the hostnames are not passed.

  • I haven´t solved it with pfsense yet.
    For all my external IP´s I use pFsense, but for my Web server (Apache) I use good old Iptables with DROP as default rule until I find out what is happening.

Log in to reply