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


Reply via email to