Hi Shawn Thank you for your response saying you got everything working with default errorfiles on a 404 error. .
Happy to see that resolved the issues for you. Andruw Smalley Loadbalancer.org Ltd. www.loadbalancer.org +1 888 867 9504 / +44 (0)330 380 1064 asmal...@loadbalancer.org Leave a Review | Deployment Guides|Blog Andruw Smalley Loadbalancer.org Ltd. www.loadbalancer.org +1 888 867 9504 / +44 (0)330 380 1064 asmal...@loadbalancer.org Leave a Review | Deployment Guides|Blog On Mon, 28 Mar 2022 at 15:01, Shawn Heisey <hapr...@elyograg.org> wrote: > > On 3/28/22 03:21, Andrew Smalley wrote: > > Now the unknown host header,, you want this.com and the user requests > > that.com and now what do we do? add a host header? reject by host > > header > > Handling invalid host headers like I want was already done, by the > default virtualhost in Apache. > > I managed to get everything working exactly how I want it to work, by > changing my google searches a little bit and finding some howto guides. > It was pretty easy in the end. I removed the 404 redirect in Apache and > in haproxy.cfg made the following changes. > > A new section: > > http-errors myerrors > errorfile 404 /etc/haproxy/errors/404.http > > And under my frontend: > > frontend web > errorfiles myerrors > http-response return status 404 default-errorfiles if { status 404 } > > Thanks, > Shawn > >