NMIS Apache Configuration
Last updated 21 June 2001

Online Version

NMIS Home Page

Below is a sample configuration for Apache to implement IP address and user name security.  Its pretty straight forward.  To produce this configuration you can run NMIS like nmis.pl type=apache which will produce a sample config with the nmis.conf or whichever file it is.
Apache Docs

For more information on the listed Apache features read:

Apache Notes

Usual Apache Config File!

<apache_root>/conf/httpd.conf

add a password to the users.dat file!
<apache_root>/bin/htpasswd /usr/local/nmis/conf/users.dat nmis

restart the daemon!
<apache_root>/bin/apachectl restart

NOTE:
<apache_root> is normally /usr/local/apache
the "bin" directory might be "sbin"
the "conf" directory might be "etc"
the httpd.conf might be split across httpd.conf, access.conf and srm.conf

NMIS Aliases

Alias /nmis/ "/usr/local/nmis/htdocs/"
ScriptAlias /cgi-nmis/ "/usr/local/nmis/cgi-bin/"

NMIS Location Setup
<Location "/cgi-nmis/nmiscgi.pl">
        ## For IP address based permissions
        Order deny,allow
        deny from all
        allow from 10.0.0.0/8 172.16.0.0/16 192.168.1.1 .sins.com.au
        ## For Username based authentication
        AuthType Basic
        AuthName "NMIS"
        AuthUserFile /usr/local/nmis/conf/users.dat
        Require valid-user
</Location>

<Location "/cgi-nmis/logs.pl">
        ## For IP address based permissions
        Order deny,allow
        deny from all
        allow from 10.0.0.0/8 172.16.0.0/16 192.168.1.1 .sins.com.au
        ## For Username based authentication
        AuthType Basic
        AuthName "NMIS"
        AuthUserFile /usr/local/nmis/conf/users.dat
        Require valid-user
</Location>

<Location "/cgi-nmis/admin.pl">
        ## For IP address based permissions
        Order deny,allow
        deny from all
        allow from 10.0.0.0/8 172.16.0.0/16 192.168.1.1 .sins.com.au
        ## For Username based authentication
        AuthType Basic
        AuthName "NMIS"
        AuthUserFile /usr/local/nmis/conf/users.dat
        Require valid-user
</Location>

<Location "/cgi-nmis/view.pl">
        ## For IP address based permissions
        Order deny,allow
        deny from all
        allow from 10.0.0.0/8 172.16.0.0/16 192.168.1.1 .sins.com.au
        ## For Username based authentication
        AuthType Basic
        AuthName "NMIS"
        AuthUserFile /usr/local/nmis/conf/users.dat
        Require valid-user
</Location>