Homestead 端口转发问题?
假设有两个项目
Homestead.yaml
文件:
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
- map: another.app
to: /home/vagrant/Code/another/public
hosts
文件:
192.168.10.10 homestead.app
192.168.10.10 another.app
这样通过域名去访问不同的项目没有问题。但如果想通过不同的端口去访问不同的项目要怎么处理?
比如通过 http://localhost:3000
访问 homestead.app
对应的项目, http://localhost:3001
访问 another.app
对应的项目。
试了下在 Homestead.yaml
文件中添加 ports
项:
ports:
- send: 3000
to: 80
protocol: tcp
这样好像只能通过 http://localhost:3000
访问 homestead.app
对应的项目,有点疑惑!!
推荐文章: