Demo Discussion
Linux Demo Database
  General linux tips & tricks  Not logged in ELOG logo
Message ID: 5     Entry time: Mon Sep 21 11:03:40 2015
Author: Stefan Ritt 
Type: Configuration 
Category: Other 
Subject: Apache restricted access 
- create user/password file:

  htpasswd -c /etc/httpd/conf/users pibeta
  <passwd>

- configure Apache in access.conf:

#
# Restrict access to pibeta for "resstricted" directory
#

<Directory /home/pibeta/WWW/restricted>
AuthName "restricted"
AuthType Basic
AuthUserFile /etc/httpd/conf/users
require valid-user
</Directory>

- restart Apache

  killall -HUP httpd
ELOG V3.1.4-80633ba