Introduction
When you want to host websites or web apps on a server, you need to tell the server how to handle different website addresses. Server blocks in nginx let you set rules for each website or app separately on the same server.
When you want to host multiple websites on one server with different domain names.
When you need to serve different content based on the website address visitors use.
When you want to set custom settings like SSL or redirects for a specific website.
When you want to separate logs for different websites on the same server.
When you want to run different web apps on different ports or paths but under one server.