I have a development machine with lamp setup. Now to add virtual hosts this is what I do currently:
- add a virtual host file
<virtualhost> ... </virtualhost>in the /etc/apache2/sites-available
- add the virtual host using
sudo a2ensite <host-file>
- sudo service apache2 restart
This works fine and I get the desired site up and running on my localhost.
Now the problem is that every time I have to make some change to the configuration file for a site, I have to sudo to edit the configuration file.
What I was wondering is if it is possible to specify some directory in my home folder where apache can look for configuration files for the sites instead of the default sites-enabled directory.