NOTE: This is not my solution. I'm merely adding it here for my own future reference and so it could help someone else down the line.
Edit your homestead serve file:
~/.composer/vendor/laravel/homestead/scripts/serve.sh
Above the line that says:
location ~.php$ {
Add this code:
include /etc/nginx/conf.d/$1-custom;
Near the bottom of the file before this line:
service nginx restart
Add this line:
touch "/etc/nginx/conf.d/$1-custom"
Re-provision the machine.
You can now store custom rewrite/config rules inside /etc/nginx/conf.d/yourdomain.com-custom
and they will never get erased.
❤️ ❤️