linux_wiki:configure_group-managed_content

This is an old revision of the document!


Configure Group-managed Content

General Information

Group managed content for collaboration.


Lab Setup

The following virtual machines will be used:

  • server1.example.com (192.168.1.150) → Perform all connectivity tests from here
  • server2.example.com (192.168.1.151) → Install Apache Web Server here

Previous Sections Completed


Basic Apache Directory Setup

Create directory to use

mkdir /data/redsite/group


Create group that will have access to the directory to manage the content

groupadd dbadmins


Add users to the group

usermod -G dbadmins user1 user2


Set permissions of new directory

chown :dbadmins /data/redsite/group
chmod 771 /data/redsite/group


Create index file

echo "Group dbadmins index file" > /data/redsite/group/index.html

Group Protected Setup

Allow htaccess override for the new group directory

vim /etc/httpd/conf.d/vhosts.conf
 
<VirtualHost *:80>
  ServerName redsite.example.com
  DocumentRoot /data/redsite
  #....SNIP....#
 
  <Directory /var/private>
    AuthType Basic
    AuthName "Group Auth - Enter Credentials"
    AuthGroupFile "/etc/httpd/conf/groupdb"
    AuthUserFile "/etc/httpd/conf/userdb"
    Require group dbadmins
  </Directory>


Create groupdb file

vim /etc/httpd/conf/groupdb
 
dbadmins: user1 user2


Create group password db file

htpasswd -c /etc/httpd/conf/userdb user1
htpasswd /etc/httpd/conf/userdb user2
  • Prompted for password each time
  • -c → Create the file
  • No “-c” the second time because it would overwrite the file instead of add to it.


Restart httpd

systemctl restart httpd


View group protected directory

elink http://redsite.example.com/group
  • Prompted for username/password

  • linux_wiki/configure_group-managed_content.1523329043.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)