linux_wiki:configure_group-managed_content

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:configure_group-managed_content [2018/04/09 23:06]
billdozor [Basic Apache Directory Setup]
linux_wiki:configure_group-managed_content [2019/05/25 23:50] (current)
Line 48: Line 48:
 <code bash> <code bash>
 chown :developers /data/redsite/devel-group chown :developers /data/redsite/devel-group
-chmod 771 /data/redsite/group+chmod 771 /data/redsite/devel-group
 </code> </code>
  
Line 61: Line 61:
 ====== Group Protected Setup ====== ====== Group Protected Setup ======
  
-Allow htaccess override for the new group directory+**Help**: Available if you installed 'httpd-manual'<code bash>elinks /usr/share/httpd/manual/howto/auth.html</code> 
 +  * Then follow the "Letting more than one person in" link 
 + 
 +\\ 
 +Create the groupdb file (list group members) 
 +<code bash> 
 +vim /etc/httpd/conf/groupdb 
 + 
 +developers: robert steve 
 +</code> 
 + 
 +\\ 
 +Create the user entries in the userdb password file 
 +<code bash> 
 +htpasswd /etc/httpd/conf/userdb robert 
 +htpasswd /etc/httpd/conf/userdb steve 
 +htpasswd /etc/httpd/conf/userdb monty 
 +</code> 
 +  * Prompted for password each time 
 +  * Give 'htpasswd' the -c argument if the userdb file does not exist to create it. 
 +    * No "-c" the second time because it would overwrite the file instead of add to it. 
 + 
 +\\ 
 +Edit the vhosts.conf and add a directory auth section for the new devel-group directory
 <code bash> <code bash>
 vim /etc/httpd/conf.d/vhosts.conf vim /etc/httpd/conf.d/vhosts.conf
Line 70: Line 93:
   #....SNIP....#   #....SNIP....#
  
-  <Directory /var/private>+  <Directory /data/redsite/devel-group>
     AuthType Basic     AuthType Basic
     AuthName "Group Auth - Enter Credentials"     AuthName "Group Auth - Enter Credentials"
     AuthGroupFile "/etc/httpd/conf/groupdb"     AuthGroupFile "/etc/httpd/conf/groupdb"
     AuthUserFile "/etc/httpd/conf/userdb"     AuthUserFile "/etc/httpd/conf/userdb"
-    Require group dbadmins+    Require group developers
   </Directory>   </Directory>
 </code> </code>
- +  Now only users in the userdb file AND in the "developersgroup are allowed to view the content. 
-\\ +    * robert and steve should be allowed in, monty should be denied.
-Create groupdb file +
-<code bash> +
-vim /etc/httpd/conf/groupdb +
- +
-dbadmins: user1 user2 +
-</code> +
- +
-\\ +
-Create group password db file +
-<code bash> +
-htpasswd -c /etc/httpd/conf/userdb user1 +
-htpasswd /etc/httpd/conf/userdb user2 +
-</code> +
-  * 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.+
  
 \\ \\
Line 106: Line 113:
 View group protected directory View group protected directory
 <code bash> <code bash>
-elink http://redsite.example.com/group+elinks http://redsite.example.com/devel-group
 </code> </code>
   * Prompted for username/password   * Prompted for username/password
  • linux_wiki/configure_group-managed_content.1523329592.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)