I’m using Debian 12, and trying to run Grav under my home/user directory, with the right permissions
This is what I did so far :
- in the /etc/apache2/envvars file, i’ve set the running user and group to “myuser:myuser” as follows :
export APACHE_RUN_USER=myuser
export APACHE_RUN_GROUP=myuser
- i’ve changed ownership of /var/www/html to “myuser:myuser” (not sure wether this is right or not)
- I’ve set a symbolic link in /var/www/html that points to /home/myuser/www/mywebsite
- in the browser, my index.html file is showing as it should when browsing to localhost/mywebsite and so does the index.php I’ve set up
But when I try to access localhost/mywebsite/grav, then I get a blank page, unless I set permissions to 777 to the entire grav folder.
First question : is it wrong to change the /var/www ownership to myuser ?
Second question : did I do well when changing the envvars file as I did ? Is that the way for apache to run under my username ?
Third question : which permissions should I give to /mywebsite/grav ? should I change something ? If I let the permissions set to 777, will there be a security problem when transferring to my webhosting ?
Thank you very much in advance. I’m trying to understand all those ownership and permissions subtleties but it’s not that simple