码迷,mamicode.com
首页 > Web开发 > 详细

Apache2(httpd)的配置

时间:2015-05-08 16:40:55      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:apache   web   

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>

-----------------------------------------------------------------------------

Apache2(httpd)的配置

标签:apache   web   

原文地址:http://blog.csdn.net/wowotouweizi/article/details/45579689

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!