<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <TITLE>NMIS Apache Configuration</TITLE> <META HTTP-EQUIV="Content-Language" CONTENT="en-us"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> <STYLE TYPE="text/css"> TD { border-width : 1px; border-style : solid; border-color : #aaaaaa; font-family : Arial; } TABLE { color : Black; background : White; border-width : 1px; border-style : solid; border-color : #aaaaaa; width : 100%; font-family : Arial; } P { font-family : Arial; } BODY { font-style : normal; font-variant : normal; font-size : small; color : white; background-color : #190032; text-decoration : none; font-family : Arial; } A:active { color : red; background-color : White; text-decoration : none } A:link { color : blue; background-color : White; text-decoration : underline } A:visited { color : blue; background-color : White; text-decoration : underline } A:hover { color : red; background-color : White; text-decoration : underline } .heading { font-style : normal; font-weight : bold; font-size : x-large; font-family : "Arial Rounded MT Bold"; background-color : #190032; color : White; } #rrdtool { position : absolute; left : 200px; top : 150px; } </STYLE> </HEAD> <BODY> <div class="heading">NMIS Apache Configuration</div> <table> <tr> <td width="33%">Last updated 21 June 2001</td> <td width="33%"> <p align="center"><a href="http://www.sins.com.au/nmis/nmis-apache.html">Online Version</a></p> </td> <td width="33%"> <p align="center"><a href="http://www.sins.com.au/nmis/">NMIS Home Page</a></p> </td> </tr> <tr> <td width="50%" colspan="3"> 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. <ul> <li><a href="#Apache Docs">Apache Docs</a></li> <li><a href="#Apache Notes">Apache Notes</a></li> <li><a href="#NMIS Aliases">NMIS Aliases</a></li> <li><a href="#NMIS Location Setup">NMIS Location Setup</a></li> </ul> </td> </tr> <tr> <td width="100%" colspan="3"><b><a name="Apache Docs">Apache Docs</a></b> <p>For more information on the listed Apache features read:</p> <ul> <li><a href="http://httpd.apache.org/docs/"><b>Apache Docs</b></a></li> <li><a href="http://httpd.apache.org/docs/mod/mod_alias.html#alias">Alias directive</a></li> <li><a href="http://httpd.apache.org/docs/mod/mod_alias.html#scriptalias">ScriptAlias directive</a></li> <li><a href="http://httpd.apache.org/docs/mod/mod_access.html#order">Order directive</a></li> <li><a href="http://httpd.apache.org/docs/mod/mod_access.html#allow">Allow directive</a></li> <li><a href="http://httpd.apache.org/docs/mod/mod_access.html#deny">Deny directive</a></li> <li><a href="http://httpd.apache.org/docs/mod/core.html#authtype">AuthType directive</a></li> <li><a href="http://httpd.apache.org/docs/mod/core.html#authname">AuthName directive</a></li> <li><a href="http://httpd.apache.org/docs/mod/mod_auth.html#authuserfile">AuthUserFile directive</a></li> <li><a href="http://httpd.apache.org/docs/mod/core.html#require">Require directive</a></li> </ul> </td> </tr> <tr> <td width="100%" colspan="3"><b><a name="Apache Notes">Apache Notes</a></b> <p>Usual Apache Config File!</p> <pre><apache_root>/conf/httpd.conf add a password to the users.dat file!</pre> <pre><apache_root>/bin/htpasswd /usr/local/nmis/conf/users.dat nmis restart the daemon!</pre> <pre><apache_root>/bin/apachectl restart</pre> <p>NOTE:<br> <apache_root> is normally /usr/local/apache<br> the "bin" directory might be "sbin"<br> the "conf" directory might be "etc"<br> the httpd.conf might be split across httpd.conf, access.conf and srm.conf </td> </tr> <tr> <td width="100%" colspan="3"><b><a name="NMIS Aliases">NMIS Aliases</a><br> </b><br> Alias /nmis/ "/usr/local/nmis/htdocs/"<br> ScriptAlias /cgi-nmis/ "/usr/local/nmis/cgi-bin/"<br> <br> </td> </tr> <tr> <td width="100%" colspan="3"><b><a name="NMIS Location Setup">NMIS Location Setup</a></b> <pre><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> </pre> </td> </tr> </table> </BODY> </HTML>