summaryrefslogtreecommitdiffstats
path: root/util/lg/README
diff options
context:
space:
mode:
Diffstat (limited to 'util/lg/README')
-rw-r--r--util/lg/README76
1 files changed, 0 insertions, 76 deletions
diff --git a/util/lg/README b/util/lg/README
deleted file mode 100644
index faa4120..0000000
--- a/util/lg/README
+++ /dev/null
@@ -1,76 +0,0 @@
-This is a looking glass based on Ed Kern's which used to be available on
-http://nitrous.digex.net/. This version supports cisco, juniper, and
-foundry, using rancid's [cfj]login to login (so rcmd is not necessary,
-it can use telnet, ssh, or rsh), and has some additional commands
-implemented. There are a few cisco commands where either no juniper or
-foundry equivalent exists or we have not had time to implement yet.
-
-packing list:
-README This file.
-index.html often the default document the server will load, contains
- an html redirect to load lgform.cgi
-lg.conf looking glass configuration file
-lg.cgi work horse of the looking glass
-lgform.cgi front-end form for the looking glass engine
-lgnotes.html user info for the looking glass
-
-the looking glass requires the CGI and LockFile-Simple perl modules.
-these can be retrieved from CPAN, http://www.cpan.org/. CGI's home is
-ftp://ftp-genome.wi.mit.edu/pub/software/WWW/. it also requires
-the POSIX module (for strftime) and Sys::Syslog, which i believe come
-with perl5 and/or are converted with h2ph(1).
-
-basic installation instructions:
-
-The configure and make install process will make variable substitutions
-and install bits in /usr/local/rancid/util/lg (or <prefix>/util/lg).
-
-1) make the scripts/html available to your server (httpd) by
- creating a directory in your server's document root directory
- (apache's httpd.conf "DocumentRoot" variable).
- eg: assuming the default in freebsd's apache pkg
- mkdir /usr/local/www/data/lg
-
- then either:
- - copy the files {lgnotes.html, lg.cgi, lgform.cgi} to
- /usr/local/www/data/lg
- OR
- - create symlinks from /usr/local/www/data/lg to each of {lgnotes.html,
- lg.cgi, lgform.cgi} in /usr/local/rancid/util/lg
-
- note on links: if you use symlinks, you have to configure apache to
- allow following symlinks. eg:
- % cat /usr/local/www/data/lg/.htaccess
- Options FollowSymLinks ExecCGI
-
- note on index.html: index.html is typically the default file loaded
- when a url ends with a '/'. index.html can be used to redirect this
- to lgform.cgi using a netscape meta refresh. Though this is supported
- by many browsers, it is supposedly netscape specific and non-standard.
- In apache, the same thing can be acheived by altering the default
- directory index like this:
-
- % cat /usr/local/www/data/lg/.htaccess
- DirectoryIndex lgform.cgi
-
-2) the LG needs to be able to find and read lg.conf. by default this
- is installed as <PREFIX>/util/lg/lg.conf and the LG will first look in
- its CWD (current working directory) and then <PREFIX>/util/lg/lg.conf if
- it does not exist in the CWD. However the LG_CONF environment variable can
- be used to move it elsewhere.
-
- to get LG_CONF into the enviroment, you can use SetEnvIf in apache's
- httpd.conf. for example:
- SetEnvIf Request_URI "\/lg/.*.cgi" LG_CONF=/usr/local/util/lg/lg.conf
-
-3) edit <PREFIX>/util/lg/lg.conf.
-
-4) set-up cron jobs to rotate the log file and clean out old cache files.
- see LG_CACHE_DIR & LG_LOG in lg.conf. something like (YMMV):
-
- # rotate lookingglass log
- #0 0 * * * cd /usr/local/www/data/lg/tmp; /usr/local/etc/savelog -m 666 -c14 lg.log
- 0 0 * * * cd /usr/local/www/data/lg/tmp; /bin/mv lg.log lg.log.0
- # clean out the lookingglass cache
- 0 0 * * * cd /usr/local/www/data/lg/tmp; /usr/local/bin/find . -type f -maxdepth 1 \( \! -name lg.log\* \) -mtime +1 -exec rm -f {} \;
-