Below you will find pages that utilize the taxonomy term “Nginx”
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.
Introducing Frontman
Frontman is a very light-weight NGINX reverse proxy that is deployed using Docker. Its purpose is to act as the entry point to your server. It will redirect incoming traffic to one out of many Docker-based applications running on the same server, based on the hostname in the incoming request.
The rationale behind this is that it enables you to host as many services as you want on the same server, while still only keeping ports 80 and 443 open to the outside world.