Forge: Nginx Templates

Nov, 5 2020#forge

Today we're excited to introduce a new feature to Laravel Forge called Nginx Templates. These templates allow you to define your own base Nginx configuration files that can be used when creating your sites.

You may have found yourself needing to make manual adjustments to a Forge site's Nginx configuration file. If you do this often, Forge's Nginx Templates can save you a lot of time. You can use these templates for anything from making small, common adjustments, to powering completely different types of applications such as those written other frameworks or languages.

You may create a template via the "Nginx Templates" tab on your server's management screen:

Creating a new Nginx template

Creating a new Nginx template

When creating a new site, you will have the option to select any of that server's available templates to use, or you may choose to use Forge's default Nginx template:

Selecting an Nginx template when creating a new site

Selecting an Nginx template when creating a new site

You can read more about Nginx templates and the variables accessible to templates on the documentation page.

Nginx templates are available to all Forge plans. We hope that you enjoy this new feature!

If you don’t have a Forge account, now is a great time to sign up. Forge allows you to painlessly create and manage PHP servers which include MySQL, Redis, Memcached, database backups, and everything else you need to run robust, modern Laravel applications.

By James Brooks

Software Developer at Laravel. Working on Nova, Forge and Envoyer.

Find me on Twitter, GitHub or my blog.

Follow the RSS Feed.