Support the ongoing development of Laravel.io →
Installation Configuration

I have an old laptop and I want to use it as a dev machine to take with me when I go fishing (I don't care if it gets destroyed eventually). Anyway, I installed Ubuntu 15.04 on it, Apache2, PHP5, Composer, MySQL, etc. and all is well there. So all of the software is on the machine and running. The site at /var/www/html is properly showing the default apache page.

Where I'm stuck however is how to create my own Laravel site. I can't go to /var/www/html and do "laravel new mysite" because it doesn't allow me to with my permissions. I don't want to do everything as root either. Ideally, I'd like to be able to create a Sites directory in my home directory and put my Laravel sites in there. How would I go about doing this?

Last updated 3 years ago.
0

There are three options here:

  1. The super simple option is not to use Apache at all and instead use the art:serve command to serve your sites locally.

  2. You could use Homestead.

  3. If you want to use Apache then you will need to create a virtual host that points to the folder you wish to use for each site. If you navigate to /etc/apache2/sites-available you will find the default implementation - just copy this and change the relevant lines so that it points at the public folder of your Laravel site.

You will then need to enable the site using:

sudo a2ensite

You may well run into some permissions issues next. Follow the installation instructions at laravel.com to ensure you grant the Apache user the relevant write permissions (mostly storage and logging issues).

Last updated 9 years ago.
0

+1 for homestead, no matter what the OS from your physical machine

0

Sign in to participate in this thread!

Eventy

Your banner here too?

ChrisF79 chrisf79 Joined 11 Feb 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.