Differences
This shows you the differences between two versions of the page.
linux_wiki:configure_group-managed_content [2018/04/08 00:06] billdozor [Basic Apache Directory Setup] |
linux_wiki:configure_group-managed_content [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== 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 | ||
- | |||
- | ---- | ||
- | |||
- | ====== Basic Apache Directory Setup ====== | ||
- | |||
- | Create directory to use | ||
- | <code bash> | ||
- | mkdir / | ||
- | </ | ||
- | |||
- | \\ | ||
- | Create group that will have access to the directory to manage the content | ||
- | <code bash> | ||
- | groupadd dbadmins | ||
- | </ | ||
- | |||
- | \\ | ||
- | Add users to the group | ||
- | <code bash> | ||
- | usermod -G dbadmins user1 user2 | ||
- | </ | ||
- | |||
- | \\ | ||
- | Set permissions of new directory | ||
- | <code bash> | ||
- | chown :dbadmins / | ||
- | chmod 771 / | ||
- | </ | ||
- | |||
- | \\ | ||
- | Create index file | ||
- | <code bash> | ||
- | echo "Group dbadmins index file" > / | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ====== Group Protected Setup ====== | ||
- | |||
- | Allow htaccess override for the new group directory | ||
- | <code bash> | ||
- | vim / | ||
- | |||
- | < | ||
- | ServerName redsite.example.com | ||
- | DocumentRoot / | ||
- | # | ||
- | |||
- | < | ||
- | AuthType Basic | ||
- | AuthName "Group Auth - Enter Credentials" | ||
- | AuthGroupFile "/ | ||
- | AuthUserFile "/ | ||
- | Require group dbadmins | ||
- | </ | ||
- | </ | ||
- | |||
- | \\ | ||
- | Create groupdb file | ||
- | <code bash> | ||
- | vim / | ||
- | |||
- | dbadmins: user1 user2 | ||
- | </ | ||
- | |||
- | \\ | ||
- | Create group password db file | ||
- | <code bash> | ||
- | htpasswd -c / | ||
- | htpasswd / | ||
- | </ | ||
- | * Prompted for password each time | ||
- | * -c -> Create the file | ||
- | * No " | ||
- | |||
- | \\ | ||
- | Restart httpd | ||
- | <code bash> | ||
- | systemctl restart httpd | ||
- | </ | ||
- | |||
- | \\ | ||
- | View group protected directory | ||
- | <code bash> | ||
- | elink http:// | ||
- | </ | ||
- | * Prompted for username/ | ||
- | |||
- | ---- | ||