Skip to main content
Fix typo and improve clarity.
Source Link
Alxs
  • 2.3k
  • 3
  • 23
  • 31

The default apacheApache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a group.groups file like this in a suitable location for your system:

# group: memberOne memberTwo memberThree etc
team: richard david jane bill

Then just creategenerate a .password file of users and hashed passwords:

$ htpasswd -c /path/to/file/.groupspasswords richard

Enter and confirm password.

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Location /private>
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile path/to/file/.passwords
  AuthGroupFile path/to/file/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Location>

Restart Apache and you're done.

The default apache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a group file like this in a suitable location for your system:

# group: memberOne memberTwo memberThree etc
team: richard david jane bill

Then just create a file of users and hashed passwords:

$ htpasswd -c /path/to/file/.groups richard

Enter and confirm password.

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Location /private>
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile path/to/file/.passwords
  AuthGroupFile path/to/file/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Location>

Restart Apache and you're done.

The default Apache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a .groups file like this in a suitable location for your system:

# group: memberOne memberTwo memberThree etc
team: richard david jane bill

Then generate a .password file of users and hashed passwords:

$ htpasswd -c /path/to/file/.passwords richard

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Location /private>
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile path/to/file/.passwords
  AuthGroupFile path/to/file/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Location>

Restart Apache and you're done.

deleted 51 characters in body
Source Link
Alxs
  • 2.3k
  • 3
  • 23
  • 31

The default apache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a group file like this in a suitable location for your system:

# /etc/httpd/conf.d/.groups
# group: memberOne memberTwo memberThree etc
 
team: richard david jane bill

Then just create a file of users and hashed passwords:

$ htpasswd -c /path/to/file/.groups richard

Enter and confirm password.

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Directory<Location "/var/www/private">private>
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile path/to/file/.passwords
  AuthGroupFile path/to/file/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Directory>Location>

Restart Apache and you're done.

The default apache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a group file like this in a suitable location for your system:

# /etc/httpd/conf.d/.groups
# group: memberOne memberTwo memberThree etc
 
team: richard david jane bill

Then just create a file of users and hashed passwords:

$ htpasswd -c /path/to/file/.groups richard

Enter and confirm password.

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Directory "/var/www/private">
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile path/to/file/.passwords
  AuthGroupFile path/to/file/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Directory>

Restart Apache and you're done.

The default apache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a group file like this in a suitable location for your system:

# group: memberOne memberTwo memberThree etc
team: richard david jane bill

Then just create a file of users and hashed passwords:

$ htpasswd -c /path/to/file/.groups richard

Enter and confirm password.

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Location /private>
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile path/to/file/.passwords
  AuthGroupFile path/to/file/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Location>

Restart Apache and you're done.

typo and clarification
Source Link
Alxs
  • 2.3k
  • 3
  • 23
  • 31

The default apache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a group file like this in a suitable location for your system:

# /etc/httpd/conf.d/.htgroupsgroups
# group: memberOne memberTwo memberThree etc

team: richard david jane bill

Then just create a file of users and hashed passwords:

$ htpasswd -c /path/to/file/.groupgroups richard

Enter and confirm password.

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Directory "/var/www/private">
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile conf.dpath/to/file/.passwords
  AuthGroupFile conf.dpath/to/file/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Directory>

Restart Apache and you'reyou're done.

The default apache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a group file like this in a suitable location for your system:

# /etc/httpd/conf.d/.htgroups
# group: memberOne memberTwo memberThree etc

team: richard david jane bill

Then just create a file of users and hashed passwords:

$ htpasswd -c /path/to/file/.group richard

Enter and confirm password.

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Directory "/var/www/private">
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile conf.d/.passwords
  AuthGroupFile conf.d/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Directory>

Restart Apache and you're done.

The default apache settings for /var/www meet your requirements already. You can restrict access to /var/www/private using Require group team as you suggested, by adding the missing configuration as follows.

Require directives default to RequireAny so it can usually be omitted unless you need to change it as shown in the configuration below.

Create a group file like this in a suitable location for your system:

# /etc/httpd/conf.d/.groups
# group: memberOne memberTwo memberThree etc

team: richard david jane bill

Then just create a file of users and hashed passwords:

$ htpasswd -c /path/to/file/.groups richard

Enter and confirm password.

Run the same command for each group member who needs access, but omit the -c (create) flag or you'll overwrite the password file with a new blank one.

Configure your Apache directives as follows, setting the correct path to the .passwords and .groups files you created above.

<Directory "/var/www/private">
Options Indexes
  AuthType basic
  AuthName "login info required"
  AuthUserFile path/to/file/.passwords
  AuthGroupFile path/to/file/.groups
<RequireAll>
  Require all granted
  Require group team
</RequireAll>
</Directory>

Restart Apache and you're done.

Improve clarity.
Source Link
Alxs
  • 2.3k
  • 3
  • 23
  • 31
Loading
Source Link
Alxs
  • 2.3k
  • 3
  • 23
  • 31
Loading