vagrant share with laravel homestead

前端 未结 4 1337
一个人的身影
一个人的身影 2021-02-08 18:29

I\'m running into an issue getting vagrant share to work in conjunction with the laravel homestead vagrant box. My homestead.yaml file looks like:

---
ip: \"192.         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-08 19:18

    @sanaco's answer missed some steps for me. This is full command to create the share (after logging in)

    vagrant share --http 80 --name silly-sausage
    

    On completion the command will out put the share URL which should look like this

    http://silly-sausage.vagrantshare.com
    

    Once the share is up you need to ssh into the vagrant box with

     vagrant ssh
    

    And run

    serve silly-sausage.vagrantshare.com ~/Code/project/path/public 
    

    Without the http flag vagrant assigns 443 to http which makes nginx complain about HTTPS port being used for HTTP connection.

    By specifying the name you only need to do the serve command first time.

提交回复
热议问题