HTTP Configure Group Managed Content Flashcards
Assuming your document root is /var/
mkdir /var/private
groupadd dbadmins
chgrp dbadmins /var/private
usermod -G dbadmins wemery
usermod -aG dbadmins user
chmod 771 /var/private
echo “This is the private directory index.html” > /var/private/index.html
semanage fcontext -a -t httpd_sys_content_t “/var/private(/.*)?”
restorecon -Rv /var/private
vim /etc/httpd/conf/httpd.conf
AllowOverride AuthConfig
vim /var/private/.htaccess
AuthType Basic
AuthName “Password Protected DBAMIN Content”
AuthUserFile “/etc/httpd/conf/.grouppasswodb”
AuthGroupFile “/etc/httpd/conf/.groupdb”
Require group dbadmins
vim /etc/httpd/conf/.groupdb
dbadmins: user wemery
chown :apache .groupdb
chmod 640 .groupdb
htpasswd -c .grouppasswddb user
htpasswd grouppasswddb wemery