Default NGINX Config 0:00When adding a new site to your server, Forge is also going to configure NGINX to explain what domain it should be listening for and how to respond to those requests. The default NGINX configuration file used by Forge is quite a standard and albeit basic configuration file. Now, we already know that Forge is capable of running more than just PHP applications. And so if you were configuring multiple non-PHP sites on your server, it could be quite a tedious task Using NGINX Templates 0:20And so if you were configuring multiple non-PHP sites on your server, it could be quite a tedious task to manually configure all of those sites and it could be quite a time-consuming task to manually edit each configuration file as you go. Forge makes this much easier to manage through a feature it calls NGINX Templates. We can find this panel under the server's dashboard. When creating an NGINX template, Forge needs two things. The name, so that we can identify the template later, Creating a Health Endpoint 0:42When creating an NGINX template, Forge needs two things. The name, so that we can identify the template later, and also the content of the configuration file. Let's say that we're going to create an endpoint served by NGINX just to check the health of our site. Endpoint. Now, Forge is already showing us the default NGINX template that it uses. And in some places, it's using different variables. Laravel Forge's documentation containsAnd in some places, it's using different variables. Laravel Forge's documentation contains all of the variables that we can use and also explains what they do. Okay, so we're going to scroll down a bit and add a new location. We'll call it health. And it's going to need to add a header of content type and that will be text plain. And then it's going to return a 200 and just say healthy. Applying Template to Site 1:22and that will be text plain. And then it's going to return a 200 and just say healthy. Let's create this NGINX template. And when we go to create a new site, which we will call default, we can select the NGINX template used to create the site with. We can choose to use Forge default or the health endpoint that we've just created. And now when we add this site Testing Health Endpoint 1:44or the health endpoint that we've just created. And now when we add this site and we access the health endpoint, we can see that it's returning healthy.