Correct Way to Setup VirtualHosts in Home Folder
Posted: 14. June 2012 10:19
Hello all,
I've installed XAMPP in accordance with the instruction and it works fine.
What I want to do, is to have an htdocs in my user's folder, i.e. I want
/home/USERNAME/htdocs/site1
/home/USERNAME/htdocs/site2
/home/USERNAME/htdocs/site3
...
I created these directories and set up virtual hosts in httpd.conf, however met a permissions problem -- whenever I try any of the sites, the Apache returns '403 forbidden' error. If I move the sites to /opt/lampp/htdocs/... and adjust the VirtualHosts directives in config file, the sites are opened properly, so it's definitely a permissions issue.
And now the question: what is the CORRECT way to set up the permissions/owner for the
/home/USERNAME/htdocs/
and
/home/USERNAME/htdocs/site1 ?
p.s. I've seen a post where JonB says the owner must be nobody:root, however if i do it, will it be possible to edit files in the folders? I don't like the idea using sudo every time I want to modify a file.
Thank you.
I've installed XAMPP in accordance with the instruction and it works fine.
What I want to do, is to have an htdocs in my user's folder, i.e. I want
/home/USERNAME/htdocs/site1
/home/USERNAME/htdocs/site2
/home/USERNAME/htdocs/site3
...
I created these directories and set up virtual hosts in httpd.conf, however met a permissions problem -- whenever I try any of the sites, the Apache returns '403 forbidden' error. If I move the sites to /opt/lampp/htdocs/... and adjust the VirtualHosts directives in config file, the sites are opened properly, so it's definitely a permissions issue.
And now the question: what is the CORRECT way to set up the permissions/owner for the
/home/USERNAME/htdocs/
and
/home/USERNAME/htdocs/site1 ?
p.s. I've seen a post where JonB says the owner must be nobody:root, however if i do it, will it be possible to edit files in the folders? I don't like the idea using sudo every time I want to modify a file.
Thank you.