Thread: Setting up basic auth on Apache
i create part of site require password. upon research, have created .htpasswd file , modified httpd.conf. when accessing /admin section (the part want secure) no password asked.
attached httpd.conf, not using .htaccess.
#================================================= =======================
<directory />
options indexes includes followsymlinks multiviews
allowoverride authconfig
order allow,deny
allow all
</directory>
<directory /admin>
# begin password protection #
authname "login"
authbasicprovider file
require valid-user
authuserfile "/home/roger/.htpasswd"
authtype basic
# end password protection #
</directory>
i go other settings such as:
and in .htaccess file of specific directory use:code:allowoverride all
code:authtype basic authname "restricted area: invitation only" authuserfile /home/www/1111 authgroupfile /dev/null #authgroupfile /usr/local/apache/passwd/groups #require group groupname require valid-user
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] Setting up basic auth on Apache
Ubuntu
Comments
Post a Comment