[OT] Re: apache.conf

Aaron Ross aaron at plusthree.com
Thu Oct 7 17:27:17 CEST 2004


IfModule is just a directive that tell apache to only use this section 
of the config file if a particular module is loaded. In this case, the 
mod_alias module. You can check in the config file for LoadModule and/or 
an AddModule command for mod_alias.c

You can add the Nagios config inside this section if you want. You can 
probably also add it outside, b/c the default apache installs almost 
always use mod_alias.

Aaron

Ken E. Satkunam wrote:
> I am very new to Linux and am trying to setup a test nagios box.  I am 
> at the point to edit the apache.conf file to setup the web interface.  I 
> am running Apache 1.3x, but have no idea where to place the ScriptAlias 
> and Alias sections detailed in the documentation.  My apache.conf file 
> has this section.  I don’t understand where to add the lines with the 
> “IfModule” sections.  Help!
> 
>  
> 
>  
> 
> <IfModule mod_alias.c>
> 
>  
> 
>     #
> 
>     # Note that if you include a trailing / on fakename then the server will
> 
>     # require it to be present in the URL.  So "/icons" isn't aliased in 
> this
> 
>     # example, only "/icons/".  If the fakename is slash-terminated, 
> then the
> 
>     # realname must also be slash terminated, and if the fakename omits the
> 
>     # trailing slash, the realname must also omit it.
> 
>     #
> 
>     Alias /icons/ "/srv/www/icons/"
> 
>  
> 
>     <Directory "/srv/www/icons">
> 
>         Options Indexes MultiViews
> 
>         AllowOverride None
> 
>         Order allow,deny
> 
>         Allow from all
> 
>     </Directory>
> 
>  
> 
>     # This Alias will project the on-line documentation tree under /manual/
> 
>     # even if you change the DocumentRoot. Comment it if you don't want to
> 
>     # provide access to the on-line documentation.
> 
>     #
> 
>     Alias /manual/ "/srv/www/htdocs/manual/"
> 
>  
> 
>     <Directory "/srv/www/htdocs/manual">
> 
>         Options Indexes FollowSymlinks MultiViews
> 
>         AllowOverride None
> 
>         Order allow,deny
> 
>         Allow from all
> 
>     </Directory>
> 
>  
> 
>     #
> 
>     # ScriptAlias: This controls which directories contain server scripts.
> 
>     # ScriptAliases are essentially the same as Aliases, except that
> 
>     # documents in the realname directory are treated as applications and
> 
>     # run by the server when requested rather than as documents sent to 
> the client.
> 
>     # The same rules about trailing "/" apply to ScriptAlias directives 
> as to
> 
>     # Alias.
> 
>     #
> 
>     ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
> 
>  
> 
> <IfModule mod_perl.c>
> 
>     # Provide two aliases to the same cgi-bin directory,
> 
>     # to see the effects of the 2 different mod_perl modes.
> 
>     # for Apache::Registry Mode
> 
>     ScriptAlias /perl/          "/srv/www/cgi-bin/"
> 
>     # for Apache::Perlrun Mode
> 
>     ScriptAlias /cgi-perl/      "/srv/www/cgi-bin/"
> 
> </IfModule>
> 
>     #
> 
>     # "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
> 
>     # CGI directory exists, if you have that configured.
> 
>     #
> 
>     <Directory "/srv/www/cgi-bin">
> 
>         AllowOverride None
> 
>         Options None
> 
>         Order allow,deny
> 
>         Allow from all
> 
>     </Directory>
> 
>  
> 
> </IfModule>
> 
> # End of aliases.
> 
>  
> 
>  
> 
>  
> 


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list