apache2(也叫httpd):
很多使用web的软件需要配置apache。
apache2的配置文件主要下面两个路径中的一个:
/etc/apache2/apache2.conf
/usr/local/conf/httpd.conf
----------------------------------------------------------------------------
配置dokuwiki:
#允许访问/var/www/dokuwiki/目录
<Directory /var/www/dokuwiki>
order deny,allow
allow from all
</Directory>
#禁制访问/var/www/dokuwiki/(data|conf|bin|inc)/目录
<LocationMatch "/(data|conf|bin|inc)/">
order allow,deny
deny from all
statisfy all
</LocationMatch>
----------------------------------------------------------------------------------
配置nagios:
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
-----------------------------------------------------------------------------
原文地址:http://blog.csdn.net/wowotouweizi/article/details/45579689