Você está na página 1de 1

Linux Workshop

Lab 15 Apache hosts & access control


Requirements Quick Reference Objectives to learn
➢ Apache server installed (httpd, apache or #Apache + virtual host + access control
apache2) vi /etc/httpd/conf/httpd.conf or vi /etc/apache2/httpd.conf or
vi /etc/apache2/vhosts.d/vhost.conf
NameVirtualHost 172.28.24.24
<VirtualHost 172.28.24.24>
ServerName wwwX.example.com
ServerAdmin root@stationX.example.com
DocumentRoot /var/www/wwwX/html
Errorlog logs/wwwX-errorlog
Customlog logs/wwwX-accesslog combined
<Directory /var/www/wwwX/html>
Options Indexes Includes
To Do
Order allow,deny
1. Place or create a web site (index.html) as a allow from .example.com
virtual host, e.g. AllowOverride AuthConfig

cd /srv/www/htdocs or cd /var/www/htdocs </Directory>


</VirtualHost>
echo “<b>DLDB</b>” > index.html vi /var/www/wwwX/html/.htaccess #Requires AllowOverride AuthConfig
2. If time permits, add authentication to the web AuthName “Whitehouse stuff”
site. AuthType Basic
AuthUserFile /etc/httpd/conf/wwwX.htpasswd
require valid-user
htpasswd -mc /etc/httpd/conf/wwwX.htpasswd username
chgrp apache /etc/httpd/conf/wwwX.htpasswd
chmod g+r /etc/httpd/conf/wwwX.htpasswd

Theory Modules
LPIC 1 Certification Bible, isbn 0-7645-4772-0
➢ p. 625-637 Using Apache
Downloadable manual(www.novell.com/documentation)
SUSE LINUX Enterprise Server – Install. and Admin.
➢ p. 529-554 Ch. 22 The Apache Web Server

Extra References
➢ www.tldp.org
➢ www.apache.org

© October 2, 2005, wiki.novell.com/index.php/Roberts_Quick_References, author of Foundations of Linux networking

Você também pode gostar