Host multiple projects in your localhost and access them with urls like http://project-name.devel/...
Use one of the following methods:
Except in the first case, you need to execute composer install
-
Move the content of this project to /var/www
-
Run
composer install. You must have composer installed. -
Copy
config/devel.vhostto your apache sites directory, often/etc/apache2/sites-available/ -
Copy
config/devel.tldto your dnsmasq config directory, usually/etc/dnsmasq.d/ -
Restart apache and dnsmasq services
-
Optionally, you can add
/var/www/binto your$PATHso you don't need to write the full path every time.$> export PATH=$PATH:/var/www/binAdd the line below to your
~/.profileif you want the change to be permanent.
For the commands above I'm going to asume you've added /var/www/bin to your $PATH.
To get help from the command line, run:
$> project-manager
Start managing a project running this command:
$> project-manager add
Then follow the instructions of the console. I suggest to run the command from the public directory of your project.
You can enable a managed project later with:
$> project-manager enable project-name
Now you're ready to browse to http://project-name.devel
Don't forget to restart your webserver after enabling virtual hosts.
You can disable an active project with the next call:
$> project-manager disable project-name
Or remove it from project management with:
$> project-manager remove project-name
Also, you can list all projects managed calling this command:
$> project-manager project:list
$> project-manager project:list --type=enabled # Only enabled projects
$> project-manager project:list --type=disabled # Only disabled projects
Easy, isn't it? ;)