Laravel Homestead vhost configuration

前端 未结 2 1506
再見小時候
再見小時候 2021-01-12 14:19

I am using Laravel homestead. For a project I need a special vhost configuration, where should I define this?

2条回答
  •  再見小時候
    2021-01-12 14:51

    I have been looking for a solution for customizing nginx vhosts. You want to do it in provisioning, or better: after provisioning otherwise Homestead will overwrite any changes you have done manually to the vhost files.

    One solution is the one I found here: https://laracasts.com/discuss/channels/requests/homestead-provision-deletes-custom-nginx-settings

    Basically you create configuration files in a folder in the host machine, map that extra folder to the vagrant machine, then in your after.sh file (which is run by homestead after the normal provisioning is finished) you just copy all of them to nginx's sites_available folder.

提交回复
热议问题