Currently installed the LAMP stack using tasksel but I’ve run into a problem. The location where the website folder is located is not easily writable. It’s a pain in the keister to do anything.
/var/www
Since I’m new to LAMP on Linux, maybe I’m doing things incorrectly. This is for my dev machine ONLY – not production.
What is the workflow if I want to develop a PHP application and run it locally on Apache? I can’t even edit files on the default path, because of permissions from Linux.
Any suggestions? Maybe I can create a folder on my Home directory and tell Apache to use that instead?
What do the regular’s do?
For me the “nicest” way to do this is to change the value of DocumentRoot inside Apache to a directory that is writable by you, or to create an alias:
open conf file (or default site), in debian/ubuntu this is located, in /etc/apache2/sites-enabled/000-default and edit DocumentRoot and other references to that directory (/var/www):
After that restart apache (sudo services apache2 restart) and then you will get it working in a writable place by you. There is only one inconvenience with this: You will have to add apache to your user group in order to give apache write permissions for uploading/creating files.
Hope this helps!
Gonzalo G.