2
votes

I merely followed the default Laravel Homestead setup here using VirtualBox. Working great.

But I need an additional Nginx rewrite setting in my apps vhost file on the VM, something like;

location / {
   if ($request_method !~ "(POST)"){
   rewrite ....
   }

    try_files $uri $uri/ /index.php?$query_string;
}

I can add that manually to the vhost file on the VM, but it's removed every time I provision my box.

How do I make that setting automatically applied when provision my vagrant VM box.

Is there a after provision hook, so I can run a script, or is there another easy solution available?

1

1 Answers

3
votes

Easiest way to achieve this is editing scripts/serve.sh file, which contains server block template in block variable.