1

I added a nginx config rewrite rule to remove static asset numbers from file names. It works great on the server config file.

    # enable static file caching
    location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif|webp)$ {
     try_files $uri $1.$2;
    }

However I'm now trying to use a custome serve-craft.sh on my homestead local to replace the default serve.laravel.sh. (to prevent losing my nginx config every time I do a reload --provision).

I'm not familiar with sh syntax and the following doesn't seem to work when I load the sh by adding a "type:craft" to my homestead.yaml I suspect the try_files line has syntax error

How could I rewrite this in shell script?

Any idea anyone?

1 Answer 1

2

The best way to accomplish what you're trying to accomplish would be to utilize the after.sh shell script that Homestead provides. Check out Extending Homestead and Local Development with Vagrant / Homestead

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.