Support the ongoing development of Laravel.io →
Installation Configuration

Switching from Windows to Ubuntu. I am curious where is best to install a project in the ubuntu file system. I plan to use composer create-project, just want to know what folder to have it installed into.

I know there's a /var/www directory where the html files go (and index.php), but for the actual project, do I want this somewhere else? /var, perhaps?

I see a /usr/ directory, but I wondered if it was good practice to have these laravel files and folders under a specific user, since the index.php would be pointing to a usr directory.

Thanks for any insight.

Last updated 3 years ago.
0

You can use: /var/www/myproject in fact you can use any directory you want (but for convention is /var/www), the only thing you need to care about is to point your Document Root to /var/www/myproject/public.

If you plan to create many projects inside /var/www is better to start using VirtualHosts for each project, that way you can define the Document Root for each project.

I hope this helps.

0

this is great info. thanks for the answer, and the insight.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Auzette auzette Joined 6 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.