How to Create a Laravel Catchall Nginx Config for Local Development

Patrick Curl
3 min readJan 2, 2020

Aka how to create a dynamic catch-all nginx config. (Mostly for laravel, but should work w/ any flow if you make some mods).

I absolutely hate editing configs all the time, and I probably create new laravel installs all the freaking time.

Today I finally got sick of the old workflow:

$ sudo cp /etc/nginx/sites-available/site1.test /etc/nginx/sites-available/site2.test
$ sudo ln -s /etc/nginx/sites-available/site2.test /etc/nginx/sites-enabled/site2.test
### edit…

--

--

Patrick Curl

I write about AI and tech news, and am building some cool stuff with AI Agents. Subscribe for free to bypass paywalls: https://curl.beehiiv.com