On the LAN, I want to setup an instance with the hostname of staging. The hostname is staging has its IP addressed assigned by DHCP from the router.
By default, http://staging points to /var/www/html.
I want it to point to a specific user at: /home/myuser/www.
I see in httpd.conf that I could change the DocumentRoot /var/www/html to /home/myuser/www, but I'm not sure how to deal with permissions for this, since all files in DocumentRoot have the ownership and group by apache.
How should I set this up? Should I have myuser added to the Apache group?
I'm doing all this so that staging matches what will be uploaded on the public hosting service.
I want this all to work, and I'm trying to avoid a mess with having to run chgrp and chown every time myuser writes files in /home/myuser/www.
Apache virtualhost on LAN and permissions?
Apache virtualhost on LAN and permissions?
Last edited by rothmail on 2018/03/21 19:32:44, edited 1 time in total.
Re: Apache virtualhost on LAN and permissions?
Why not use use /var/www/yourhost and have everything work out of the box?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Apache virtualhost on LAN and permissions?
Good question.TrevorH wrote:Why not use use /var/www/yourhost and have everything work out of the box?
Because the directory structure for the hosting service's VPS is this:
/home/myuser/www
They don't use /var/www/html on the hosting VPS. So each time something is uploaded, it required editing a configuration file.