How to read Cisco Documentation CDROM on Linux platform

  1. mount the cisco cdrom ( mount /dev/cdrom /mnt/cdrom )
  2. start httpd apache daemon.
  3. define a virtual server by mean of a listen on a port of your choice id:
    Listen 127.0.0.1:8080

    You must include a Listen for your virtual servers in your virtual host configuration (specialized file or httpd.conf file); add the following instructions:

    
    Options Indexes FollowSymlinks
    DocumentRoot /mnt/cdrom
    AddHandler gunzip .htm
    Action gunzip /cgi-bin/CiscoDoc
    
    
  4. put in your Cgi directory /home/httpd/cgi-bin the following file
    
    #!/bin/sh
    #
    #
    echo Content-type:text/html
    echo
    
    
    FULL_PATH="$DOCUMENT_ROOT""$PATH_INFO"
    
    ROOT_FILE="$DOCUMENT_ROOT""/home/home.htm"
    
    if [ -f "$ROOT_FILE" ]; then
    
       bunzip2 -t "$FULL_PATH"  1> /dev/null 2>&1
    
       rc2=$?
    
       if [ "$rc2" = "0" ]; then
          bunzip2 --stdout "$FULL_PATH"
       else
          gunzip -l "$FULL_PATH"   1> /dev/null 2>&1
          rc=$?
    
          if [ "$rc" = "0" ]; then
          	gunzip --stdout "$FULL_PATH"
          else
          	cat "$FULL_PATH"
          fi
       fi
    
    else
       echo "<HTML><BODY>"
       echo "<H1>Root file (" $ROOT_FILE ") not present</H1>"
       echo "<H2>May be do you not remember to insert cdrom ? </H2>>"
       echo "</BODY></HTML>"
    fi
    
    #echo "<HTML>
    
  5. Make it executable with the command
       chmod -c 755 CiscoDoc 
    
  6. Now you can access Cisco Manuals using URL: "http://localhost:8080/home/home.htm"
$Log: ciscodoc.html,v $
Revision 1.1  2000/10/22 12:59:08  andrew
Initial revision