Laravel Forge – Password Protect a Folder

Matt Stauffer continues his Laravel Forge series today by covering how to password protect a folder:

Today I needed to get an old CodeIgniter site online somewhere, password-protected, to train someone on. So, I spun up a new site on one of my Forge servers, uploaded the code, ran the migrations, and was ready to go–until I realized I didn’t know how to password protect a folder in Nginx.

Thankfully, it’s almost easier than it is in Apache.

Not Laravel specific but good to know for future projects.