Below you will find pages that utilize the taxonomy term “DNS”
Posts
read more
Trick your local web server using the Host header
TLDR: If you need to “trick” a local web server that you’re making requests to a certain domain, but do not want (or have permissions) to modify /etc/hosts
- Set the intended domain in the Host
request header instead.
We are currently working on a project where we have an nginx instance that is redirecting traffic for many different domains. In our case, the nginx is an ingress controller in a kubernetes cluster, but you might use a similar approach if you’re hosting multiple websites on the same webserver.