简体   繁体   English

更改 laravel 宅基地默认 web 服务器

[英]Change laravel homestead default web server

I am developing different web applications on Laravel Homestead Branch 20.04 development environment generaly I develop apps running on nginx web server but one time I needed to run legacy app on Apache so I put in Homestead.yaml site settings as below: I am developing different web applications on Laravel Homestead Branch 20.04 development environment generaly I develop apps running on nginx web server but one time I needed to run legacy app on Apache so I put in Homestead.yaml site settings as below:

sites:
    - map: site.test
      to: /home/vagrant/site-project/
      type: "apache"
,
,
,
with other sites settings

Everything runs normally and I was running flip shell command to switch between servers, but after I delete the project and removed site settings from Homestead.yaml and run vagrant reload --provision .一切运行正常,我正在运行flip shell 命令在服务器之间切换,但是在我删除项目并从Homestead.yaml删除站点设置并运行vagrant reload --provision Apache web server always runs as default server and I need to run flip to switch to nginx web server even there is no site type is 'apache'. Apache web server always runs as default server and I need to run flip to switch to nginx web server even there is no site type is 'apache'.

The question is how can I return nginx server to be the default one?问题是如何将nginx服务器返回为默认服务器?

Generally you should issue next commands in vagrant's (homestead's) terminal:通常,您应该在 vagrant(宅基地)的终端中发出下一个命令:

sudo /etc/init.d/apache2 stop && sudo /etc/init.d/nginx start

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM