我有一个 Homestead VM,其中包含多个 nginx 站点和几个 apache 站点,所有内容都通过 Homestead.yaml 文件配置(下面的简短示例):
sites:
- map: site1.local
to: /home/vagrant/site1
php: "7.1"
#type: "apache <= (commented on purpose, not an error)
- map: site2.local
to: /home/vagrant/site2
php: "7.1"
Run Code Online (Sandbox Code Playgroud)
我一直在努力打开和关闭设置type: "apache",以便虚拟机开始运行 apache (而不是 nginx),具体取决于我在特定时刻需要处理的站点。
我现在的问题是,升级Vagrant和Homestead后,它总是默认启动apache,无论是否指定,总是!所以每次启动机器时,我都需要 ssh-it 和flip服务器。
我什至尝试使用服务配置指令如下,但没有运气:
services:
- enabled:
- "nginx"
- disabled:
- "apache2"
Run Code Online (Sandbox Code Playgroud)
有什么想法吗?请帮忙!
我正在使用的版本:
Vagrant 2.2.7
Homestead 10.8.0
Run Code Online (Sandbox Code Playgroud)