[CentOS] Virtual Hosts and users

Sat Mar 23 14:52:02 UTC 2013
Les Mikesell <lesmikesell at gmail.com>

On Fri, Mar 22, 2013 at 8:09 PM, Bruce Whealton
<bruce at futurewaveonline.com> wrote:
> Hello,
> I do have virtual hosts setup.  I registered one domain and used a second
> service that allowed me to use a subdomain on their domains and have it
> point to my IP for my server (the external IP). This might let me give
> permissions to someone to help me if I get stuck.  This might be off-topic
> on a Centos list, although some issues do seem to relate to setting
> permissions, ownership, virtual hosts and etc.
> For example, I have the registered domain setup as the first virtual host
> and this is done inside the httpd.conf file.  So, it's basically inside
> ./html/public_html/
> Then my second domain is setup in a vhosts.d config file.  But I didn't
> associate a user with that.  Therefore both domains seem to require that the
> owner is apache:apache, which is set in the httpd.conf file.
> How do I setup domain2.com as a second (or third) virtual host *and* setup a
> username/pw for accessing that domain and others.

Apache is infinitely configurable.  And web login users normally don't
have anything to do with the permissions on the underlying files and
directories.  See http://httpd.apache.org/docs/2.2/howto/auth.html.
You'll have to decide how you want to store the passwords and set up
the restrictions on the top-level directory for each site.
http://httpd.apache.org/docs/2.2/howto/auth.html

-- 
  Les Mikesell
    lesmikesell at gmail.com