Monday 24 December 2012

Apache DirectoryMatch

DirectoryMatch

For Ubuntu system:

######################################################################################################################################

hostname:/etc/nagios3$ cat apache2.conf
# apache configuration for nagios 3.x

ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3

# Where the stylesheets (config files) reside
Alias /nagios3/stylesheets /etc/nagios3/stylesheets

# Where the HTML pages live
Alias /nagios3 /usr/share/nagios3/htdocs

<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
    Options FollowSymLinks
    DirectoryIndex index.html
    AllowOverride AuthConfig
    Order Allow,Deny
    Allow From All
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /etc/nagios3/htpasswd.users
    require valid-user
</DirectoryMatch>


######################################################################################################################################

NOTE2:
######################################################################################################################################
cat: /etc/apache2/apache2.conf:


# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

######################################################################################################################################

NOTE3:

ls -l /etc/apache2/conf.d/

nagios3.conf  --> /etc/nagios3/apache2.conf

No comments:

Post a Comment