Skip to Content
Apache: The Definitive Guide, 3rd Edition
book

Apache: The Definitive Guide, 3rd Edition

by Ben Laurie, Peter Laurie
December 2002
Intermediate to advanced
588 pages
25h 57m
English
O'Reilly Media, Inc.
Content preview from Apache: The Definitive Guide, 3rd Edition

site.authent

Examples are found in site.authent. The first Config file, .../conf/httpd1.conf, looks like this:

User webuser
Group webgroup
ServerName www.butterthlies.com
NameVirtualHost 192.168.123.2

<VirtualHost www.butterthlies.com>
ServerAdmin sales@butterthlies.com
DocumentRoot /usr/www/APACHE3/site.authent/htdocs/customers
ServerName www.butterthlies.com
ErrorLog /usr/www/APACHE3/site.authent/logs/error_log
TransferLog /usr/www/APACHE3/site.authent/logs/customers/access_log
ScriptAlias /cgi-bin /usr/www/APACHE3/cgi-bin
</VirtualHost>

<VirtualHost sales.butterthlies.com>
ServerAdmin sales_mgr@butterthlies.com
DocumentRoot /usr/www/APACHE3/site.authent/htdocs/salesmen
ServerName sales.butterthlies.com
ErrorLog /usr/www/APACHE3/site.authent/logs/error_log
TransferLog /usr/www/APACHE3/site.authent/logs/salesmen/access_log
ScriptAlias /cgi-bin /usr/www/APACHE3/cgi-bin

<Directory /usr/www/APACHE3/site.authent/htdocs/salesmen>
AuthType Basic
AuthName darkness
AuthUserFile /usr/www/APACHE3/ok_users/sales
AuthGroupFile /usr/www/APACHE3/ok_users/groups
require valid-user
</Directory>

</VirtualHost>

What’s going on here? The key directive is AuthType Basic in the <Directory ...salesmen> block. This turns Authentication checking on.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tomcat: The Definitive Guide, 2nd Edition

Tomcat: The Definitive Guide, 2nd Edition

Jason Brittain, Ian F. Darwin
HTTP: The Definitive Guide

HTTP: The Definitive Guide

David Gourley, Brian Totty, Marjorie Sayer, Anshu Aggarwal, Sailu Reddy
Nginx HTTP Server - Fourth Edition

Nginx HTTP Server - Fourth Edition

Martin Bjerretoft Fjordvald, Nedelcu

Publisher Resources

ISBN: 0596002033Supplemental ContentErrata Page