Rambling my thoughts and experience

Update application directory in homestead VM

Posted by Shailesh Davara on January 28, 2015 | 1 Minute Read

Laravel provides a great vagrant package “Homestead”. Its a great tool for running application locally across the different machines without worrying about software requirement.

But recently, I came across a problem of updating my application directory in a default configuration and my site stopped to work. I know that could have been solved with the help of ‘vagrant –provision’, but I’d like to explore other options.

Finally, I found that I need to update nginx sites inside my Homestead box.

I have listed below steps for updating your application folder.

Step 1 : Logon to homestead machine

    homestead ssh

Step 2 : Navigate to ngnix available sites location

    cd /etc/nginx/sites-available/

Step 3 : Edit your application

    // you need to edit your application
    vi homestead.app

Step 4 : Update your root location

You will see ‘root’ variable in your application configuration, you’ll need to update it.

Please note that, this location should be your VM location.

Step 5 : Important!! Restart nginx

    sudo /etc/init.d/nginx restart

I hope you enjoyed this.