Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

knubbe82's avatar

Laravel Homestead with Apache server

How to set Homestead for projects that requires Apache server? Right now in Homestead.yaml I only have Laravel projects

0 likes
4 replies
Braunson's avatar

Check the docs :)

Specifically under "Adding Additional Sites > Site Type" https://laravel.com/docs/master/homestead#adding-additional-sites

Homestead supports several types of sites which allow you to easily run projects that are not based on Laravel. For example, let's add the apache type..

sites:
    - map: project.test
      to: /home/vagrant/code/my-project/web
      type: "apache"

Also check out "Web Servers" https://laravel.com/docs/master/homestead#web-servers

Homestead uses the Nginx web server by default. However, it can install Apache if apache is specified as a site type. While both web servers can be installed at the same time, they cannot both be running at the same time. The flip shell command is available to ease the process of switching between web servers. The flip command automatically determines which web server is running, shuts it off, and then starts the other server. To use this command, SSH into your Homestead machine and run the command in your terminal:

flip

;)

Please or to participate in this conversation.