back forward index

Webservers and how they work with perl:


Table of Contents

  1. Microsoft Server Installation considerations (IIS,Personal WS ,PEER WS) IMP !!
  2. A list of webservers which are freeware or shareware and work with perl .
  3. Authorisation scripts....
  4. Why doesn't It Work ?
    1. Authorisation scripting for Password protection.

      Authorisation script

      if ($ENV{'REMOTE_USER'} ne "robin")
       {&throw401;
       	print "<html><head><title>Invalid user </title></head><body><h1>I have no record of User $ENV{'REMOTE_USER'} </h1></body></html>  ";
      	exit;}
        print "HTTP/1.0 201 Ok \n";
        print "Content-type:text/html\n\n";
        print "<html><head><title>You made it</title></head><body><h1>you made it, $ENV{'REMOTE_USER'} </h1></body></html>  ";
      foreach $key (keys %ENV)
       {
       printf "$key = $ENV{$key}<BR> \n";
       }
      
      }
      
      
      sub throw401
      {
      print "HTTP/1.0 401 Access Denied\n";
      print "WWW-Authenticate: Basic\n";
      print "WWW-Authenticate: NTLM\n";
      print "Content-Length: 24\n\n";
      }
      Download the script
      
      For more info on authorisation try the Microsoft Knowledge base


      Copyright © Robin S. Chatterjee. All rights reserved.

      back forward index

      This page hosted by Get your own Free Home Page