Laravel 宅地-通过http://localhost:PORT
有人知道有没有办法解决Laravel 宅地-通过http://localhost:PORT,laravel,vagrant,homestead,Laravel,Vagrant,Homestead,有人知道有没有办法解决http://localhost:PORT到在宅地上运行的项目。 因此,传统上,您只需在host和homestad.yaml上设置所需的地址,如下所示 主机 192.168.10.10 first.test 192.168.10.10 second.test 宅地。yaml ip: "192.168.10.10" folders: ## first config - map: C:\Users\first to: /home/vagrant/f
http://localhost:PORT
到在宅地上运行的项目。
因此,传统上,您只需在host
和homestad.yaml
上设置所需的地址,如下所示
主机
192.168.10.10 first.test
192.168.10.10 second.test
宅地。yaml
ip: "192.168.10.10"
folders:
## first config
- map: C:\Users\first
to: /home/vagrant/first
## first config
- map: C:\Users\second
to: /home/vagrant/second
sites:
## first config
- map: first.test
to: /home/vagrant/first/public
php: "7.1"
## second config
- map: second.test
to: /home/vagrant/second/public
php: "7.1"
但是当我想先使用localhost:8082
或localhost:8083
而不是时,test
和second.test
不起作用
旁注:我之所以想使用localhost,是因为我有多个项目,而且我正在处理这些项目,除非您使用localhost,否则服务人员需要HTTPS
感谢可能想知道的其他人,在尝试
localhost:PORT
方法多次失败时。我决定采取另一种方式,在homestead上启用https。对于其他可能想知道的人,只需遵循或。,而尝试localhost:PORT
方法多次失败。我决定采取另一种方式,在homestead上启用https。只需遵循或。这是应在要侦听的web服务器软件上设置的选项:,(注意端口部件)。这是应在要侦听的web服务器软件上设置的选项:,(注意端口部件)。