File:  [LON-CAPA] / loncom / loncapa_apache.conf
Revision 1.13: download - view: text, annotated - select for diffs
Thu Aug 8 13:45:21 2002 UTC (21 years, 9 months ago) by www
Branches: MAIN
CVS tags: HEAD
Routines for file upload

    1: ##
    2: ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
    3: ##
    4: ## $Id: loncapa_apache.conf,v 1.13 2002/08/08 13:45:21 www Exp $
    5: ##
    6: ## 1/11/2002 - Scott Harrison
    7: ## 2/19/2002 - Scott Harrison
    8: ## 2/28/2002 - Scott Harrison
    9: ## 3/2/2002 - Scott Harrison
   10: ## 5/12/2002 - Scott Harrison
   11: 
   12: #
   13: # LON-CAPA Section (extensions to httpd.conf daemon configuration)
   14: #
   15: # ================================================================ DocumentRoot
   16: 
   17: DocumentRoot "/home/httpd/html"
   18: 
   19: # ======================================================================== User
   20: 
   21: User www
   22: Group www
   23: 
   24: # ======================================================= Shared Object Modules
   25: 
   26: LoadModule perl_module       modules/libperl.so
   27: AddModule mod_perl.c
   28: 
   29: # =============================================================== Miscellaneous
   30: 
   31: ServerAdmin korte@lite.msu.edu
   32: ExtendedStatus On
   33: 
   34: #
   35: # LON-CAPA Section (extensions to srm.conf name space servicing)
   36: #
   37: # ===================================================================== Aliases
   38: 
   39: Alias /prtspool/ /home/httpd/prtspool/
   40: ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"
   41: 
   42: # ================================================================= Directories
   43: 
   44: # ------------------------------------------------------------- Access Handlers
   45: 
   46: PerlTransHandler	Apache::lontrans
   47: 
   48: <LocationMatch "^/res.*">
   49: PerlAccessHandler       Apache::lonacc
   50: PerlHeaderParserHandler Apache::lonrep
   51: ErrorDocument     403 /adm/login
   52: ErrorDocument     404 /adm/notfound.html
   53: ErrorDocument     406 /adm/roles
   54: ErrorDocument	  500 /adm/errorhandler
   55: </LocationMatch>
   56: 
   57: <LocationMatch "^/userfiles.*">
   58: PerlAccessHandler       Apache::lontokacc
   59: </LocationMatch>
   60: 
   61: <LocationMatch "^/uploaded.*">
   62: PerlAccessHandler	Apache::lonuploadedacc
   63: ErrorDocument     404 /adm/notfound.html
   64: ErrorDocument	  500 /adm/errorhandler
   65: </LocationMatch>
   66: 
   67: <LocationMatch "^/priv.*">
   68: PerlAccessHandler Apache::loncacc
   69: SetHandler        perl-script
   70: PerlHandler       Apache::lonconstruct
   71: ErrorDocument     403 /adm/login
   72: ErrorDocument     404 /adm/notfound.html
   73: ErrorDocument     406 /adm/unauthorized.html
   74: ErrorDocument	  500 /adm/errorhandler
   75: </LocationMatch>
   76: 
   77: <LocationMatch "^/raw.*">
   78: PerlAccessHandler Apache::lonracc
   79: </LocationMatch>
   80: 
   81: <LocationMatch "^/\~.*">
   82: PerlAccessHandler Apache::loncacc
   83: ErrorDocument     403 /adm/login
   84: ErrorDocument     404 /adm/notfound.html
   85: ErrorDocument     406 /adm/unauthorized.html
   86: ErrorDocument	  500 /adm/errorhandler
   87: AllowOverride None
   88: </LocationMatch>
   89: 
   90: # ------------------------------------------------------------------------- RAT
   91: 
   92: <LocationMatch "^/\~.*\.sequence$">
   93: SetHandler perl-script
   94: PerlHandler Apache::lonratedt
   95: </LocationMatch>
   96: 
   97: <LocationMatch "^/\~.*\.page$">
   98: SetHandler perl-script
   99: PerlHandler Apache::lonratedt
  100: </LocationMatch>
  101: 
  102: <LocationMatch "^/\~.*\/ratserver$">
  103: SetHandler perl-script
  104: PerlHandler Apache::lonratsrv
  105: </LocationMatch>
  106: 
  107: <Location /adm/ratparms>
  108: PerlAccessHandler       Apache::lonacc
  109: SetHandler perl-script
  110: PerlHandler Apache::lonratparms
  111: ErrorDocument     403 /adm/login
  112: ErrorDocument	  500 /adm/errorhandler
  113: </Location>
  114: 
  115: # --------------------------------------------- Resource Space Content Handlers
  116: 
  117: <LocationMatch "^/res.*/$">
  118: SetHandler perl-script
  119: PerlHandler Apache::lonindexer
  120: </LocationMatch>
  121: 
  122: <LocationMatch "^/(res|\~).*\.tex$">
  123: SetHandler perl-script
  124: PerlHandler Apache::lontex
  125: </LocationMatch>
  126: 
  127: <LocationMatch "^/res/.*\.page$>
  128: SetHandler perl-script
  129: PerlHandler Apache::lonpage
  130: </LocationMatch>
  131: 
  132: <LocationMatch "^/res/.*\.sequence$>
  133: SetHandler perl-script
  134: PerlHandler Apache::lonsequence
  135: </LocationMatch>
  136: 
  137: <LocationMatch "^/(res|\~).*\.meta$>
  138: SetHandler perl-script
  139: PerlHandler Apache::lonmeta
  140: </LocationMatch>
  141: 
  142: <LocationMatch "^/(res|\~).*\.(xml|html|htm|xhtml|xhtm)$">
  143: SetHandler perl-script
  144: PerlHandler Apache::lonxml
  145: </LocationMatch>
  146: 
  147: <LocationMatch "^/(res|\~).*\.(problem|exam|quiz|assess|survey|form|library)$">
  148: SetHandler perl-script
  149: PerlHandler Apache::lonhomework
  150: </LocationMatch>
  151: 
  152: <LocationMatch "^/adm/wrapper/">
  153: PerlAccessHandler       Apache::lonacc
  154: SetHandler perl-script
  155: PerlHandler Apache::lonwrapper
  156: ErrorDocument     403 /adm/login
  157: ErrorDocument	  500 /adm/errorhandler
  158: </LocationMatch>
  159: 
  160: # -------------------------------------------------------------- Admin Programs
  161: 
  162: <Location /adm/statistics>
  163: PerlAccessHandler       Apache::lonacc
  164: SetHandler perl-script
  165: PerlHandler Apache::lonstatistics
  166: ErrorDocument     403 /adm/login
  167: ErrorDocument	  500 /adm/errorhandler
  168: </Location>
  169: 
  170: <Location /adm/roles>
  171: PerlAccessHandler       Apache::lonacc
  172: SetHandler perl-script
  173: PerlHandler Apache::lonroles
  174: ErrorDocument     403 /adm/login
  175: ErrorDocument	  500 /adm/errorhandler
  176: </Location>
  177: 
  178: <Location /adm/login>
  179: SetHandler perl-script
  180: PerlHandler Apache::lonlogin
  181: </Location>
  182: 
  183: <Location /adm/logout>
  184: PerlAccessHandler       Apache::lonacc
  185: SetHandler perl-script
  186: PerlHandler Apache::lonlogout
  187: ErrorDocument     403 /adm/login
  188: </Location>
  189: 
  190: <Location /adm/authenticate>
  191: SetHandler perl-script
  192: PerlHandler Apache::lonauth
  193: </Location>
  194: 
  195: <Location /adm/annotations>
  196: PerlAccessHandler       Apache::lonacc
  197: SetHandler perl-script
  198: PerlHandler Apache::admannotations
  199: ErrorDocument     403 /adm/login
  200: ErrorDocument	  500 /adm/errorhandler
  201: </Location>
  202: 
  203: <Location /adm/bookmarks>
  204: PerlAccessHandler       Apache::lonacc
  205: SetHandler perl-script
  206: PerlHandler Apache::admbookmarks
  207: ErrorDocument     403 /adm/login
  208: ErrorDocument	  500 /adm/errorhandler
  209: </Location>
  210: 
  211: <Location /adm/flip>
  212: PerlAccessHandler       Apache::lonacc
  213: SetHandler perl-script
  214: PerlHandler Apache::lonpageflip
  215: ErrorDocument     406 /adm/roles
  216: ErrorDocument     403 /adm/login
  217: ErrorDocument	  500 /adm/errorhandler
  218: </Location>
  219: 
  220: <Location /adm/ambiguous>
  221: PerlAccessHandler       Apache::lonacc
  222: SetHandler perl-script
  223: PerlHandler Apache::lonambiguous
  224: ErrorDocument     403 /adm/login
  225: ErrorDocument	  500 /adm/errorhandler
  226: </Location>
  227: 
  228: <Location /adm/email>
  229: PerlAccessHandler       Apache::lonacc
  230: SetHandler perl-script
  231: PerlHandler Apache::lonmsg
  232: ErrorDocument     403 /adm/login
  233: ErrorDocument	  500 /adm/errorhandler
  234: </Location>
  235: 
  236: <Location /adm/parmset>
  237: PerlAccessHandler       Apache::lonacc
  238: SetHandler perl-script
  239: PerlHandler Apache::lonparmset
  240: ErrorDocument     403 /adm/login
  241: ErrorDocument     406 /adm/roles
  242: ErrorDocument	  500 /adm/errorhandler
  243: </Location>
  244: 
  245: <Location /adm/grades>
  246: PerlAccessHandler       Apache::lonacc
  247: SetHandler perl-script
  248: PerlHandler Apache::grades
  249: ErrorDocument     403 /adm/login
  250: ErrorDocument     406 /adm/roles
  251: ErrorDocument	  500 /adm/errorhandler
  252: </Location>
  253: 
  254: <Location /adm/createcourse>
  255: PerlAccessHandler       Apache::lonacc
  256: SetHandler perl-script
  257: PerlHandler Apache::loncreatecourse
  258: ErrorDocument     403 /adm/login
  259: ErrorDocument     406 /adm/roles
  260: ErrorDocument	  500 /adm/errorhandler
  261: </Location>
  262: 
  263: <Location /adm/createuser>
  264: PerlAccessHandler       Apache::lonacc
  265: SetHandler perl-script
  266: PerlHandler Apache::loncreateuser
  267: ErrorDocument     403 /adm/login
  268: ErrorDocument     406 /adm/roles
  269: ErrorDocument	  500 /adm/errorhandler
  270: </Location>
  271: 
  272: <Location /adm/publish>
  273: PerlAccessHandler       Apache::lonacc
  274: SetHandler perl-script
  275: PerlHandler Apache::lonpublisher
  276: ErrorDocument     403 /adm/login
  277: ErrorDocument     404 /adm/notfound.html
  278: ErrorDocument     406 /adm/unauthorized.html
  279: ErrorDocument	  500 /adm/errorhandler
  280: </Location>
  281: 
  282: <LocationMatch "^/\~.*/$">
  283: PerlAccessHandler       Apache::loncacc
  284: SetHandler perl-script
  285: PerlHandler Apache::lonpubdir
  286: ErrorDocument     403 /adm/login
  287: ErrorDocument     404 /adm/notfound.html
  288: ErrorDocument     406 /adm/unauthorized.html
  289: ErrorDocument	  500 /adm/errorhandler
  290: </LocationMatch>
  291: 
  292: <Location /adm/pubdir>
  293: PerlAccessHandler       Apache::lonacc
  294: SetHandler perl-script
  295: PerlHandler Apache::lonpubdir
  296: ErrorDocument     403 /adm/login
  297: ErrorDocument     404 /adm/notfound.html
  298: ErrorDocument     406 /adm/unauthorized.html
  299: ErrorDocument	  500 /adm/errorhandler
  300: </Location>
  301: 
  302: <Location /adm/retrieve>
  303: PerlAccessHandler       Apache::lonacc
  304: SetHandler perl-script
  305: PerlHandler Apache::lonretrieve
  306: ErrorDocument     403 /adm/login
  307: ErrorDocument     404 /adm/notfound.html
  308: ErrorDocument     406 /adm/unauthorized.html
  309: ErrorDocument	  500 /adm/errorhandler
  310: </Location>
  311: 
  312: <Location /adm/cfile>
  313: PerlAccessHandler       Apache::lonacc
  314: SetHandler perl-script
  315: PerlHandler Apache::loncfile
  316: ErrorDocument     403 /adm/login
  317: ErrorDocument     404 /adm/notfound.html
  318: ErrorDocument     406 /adm/unauthorized.html
  319: ErrorDocument	  500 /adm/errorhandler
  320: </Location>
  321: 
  322: <Location /adm/diff>
  323: PerlAccessHandler       Apache::lonacc
  324: SetHandler perl-script
  325: PerlHandler Apache::londiff
  326: ErrorDocument     403 /adm/login
  327: ErrorDocument     404 /adm/notfound.html
  328: ErrorDocument     406 /adm/unauthorized.html
  329: ErrorDocument	  500 /adm/errorhandler
  330: </Location>
  331: 
  332: <Location /adm/upload>
  333: PerlAccessHandler       Apache::lonacc
  334: SetHandler perl-script
  335: PerlHandler Apache::lonupload
  336: ErrorDocument     403 /adm/login
  337: ErrorDocument     404 /adm/notfound.html
  338: ErrorDocument     406 /adm/unauthorized.html
  339: ErrorDocument	  500 /adm/errorhandler
  340: </Location>
  341: 
  342: <Location /adm/assesscalc>
  343: PerlAccessHandler       Apache::lonacc
  344: SetHandler perl-script
  345: PerlHandler Apache::lonspreadsheet
  346: ErrorDocument     403 /adm/login
  347: ErrorDocument     406 /adm/roles
  348: ErrorDocument	  500 /adm/errorhandler
  349: </Location>
  350: 
  351: <Location /adm/studentcalc>
  352: PerlAccessHandler       Apache::lonacc
  353: SetHandler perl-script
  354: PerlHandler Apache::lonspreadsheet
  355: ErrorDocument     403 /adm/login
  356: ErrorDocument     406 /adm/roles
  357: ErrorDocument	  500 /adm/errorhandler
  358: </Location>
  359: 
  360: <Location /adm/classcalc>
  361: PerlAccessHandler       Apache::lonacc
  362: SetHandler perl-script
  363: PerlHandler Apache::lonspreadsheet
  364: ErrorDocument     403 /adm/login
  365: ErrorDocument     406 /adm/roles
  366: ErrorDocument	  500 /adm/errorhandler
  367: </Location>
  368: 
  369: <Location /adm/dropadd>
  370: PerlAccessHandler       Apache::lonacc
  371: SetHandler perl-script
  372: PerlHandler Apache::londropadd
  373: ErrorDocument     403 /adm/login
  374: ErrorDocument     406 /adm/roles
  375: ErrorDocument	  500 /adm/errorhandler
  376: </Location>
  377: 
  378: <Location /adm/printout>
  379: PerlAccessHandler       Apache::lonacc
  380: SetHandler perl-script
  381: PerlHandler Apache::lonprintout
  382: ErrorDocument     403 /adm/login
  383: ErrorDocument	  500 /adm/errorhandler
  384: </Location>
  385: 
  386: <Location /adm/feedback>
  387: PerlAccessHandler       Apache::lonacc
  388: SetHandler perl-script
  389: PerlHandler Apache::lonfeedback
  390: ErrorDocument     403 /adm/login
  391: ErrorDocument	  500 /adm/errorhandler
  392: </Location>
  393: 
  394: <Location /adm/coursedocs>
  395: PerlAccessHandler       Apache::lonacc
  396: SetHandler perl-script
  397: PerlHandler Apache::londocs
  398: ErrorDocument     403 /adm/login
  399: ErrorDocument	  500 /adm/errorhandler
  400: </Location>
  401: 
  402: <Location /adm/announcements>
  403: PerlAccessHandler       Apache::lonacc
  404: SetHandler perl-script
  405: PerlHandler Apache::lonannounce
  406: ErrorDocument     403 /adm/login
  407: ErrorDocument	  500 /adm/errorhandler
  408: </Location>
  409: 
  410: <Location /adm/chat>
  411: PerlAccessHandler       Apache::lonacc
  412: SetHandler perl-script
  413: PerlHandler Apache::lonchat
  414: ErrorDocument	  500 /adm/errorhandler
  415: </Location>
  416: 
  417: <Location /adm/chatfetch>
  418: PerlAccessHandler       Apache::lonacc
  419: SetHandler perl-script
  420: PerlHandler Apache::lonchatfetch
  421: ErrorDocument	  500 /adm/errorhandler
  422: </Location>
  423: 
  424: <Location /adm/evaluate>
  425: PerlAccessHandler       Apache::lonacc
  426: SetHandler perl-script
  427: PerlHandler Apache::lonevaluate
  428: ErrorDocument     403 /adm/login
  429: ErrorDocument	  500 /adm/errorhandler
  430: </Location>
  431: 
  432: <Location /adm/preferences>
  433: PerlAccessHandler       Apache::lonacc
  434: SetHandler perl-script
  435: PerlHandler Apache::lonpreferences
  436: ErrorDocument     403 /adm/login
  437: ErrorDocument	  500 /adm/errorhandler
  438: </Location>
  439: 
  440: <Location /adm/assignments>
  441: PerlAccessHandler       Apache::lonacc
  442: SetHandler perl-script
  443: PerlHandler Apache::lonassignments
  444: ErrorDocument     403 /adm/login
  445: ErrorDocument     406 /adm/roles
  446: ErrorDocument	  500 /adm/errorhandler
  447: </Location>
  448: 
  449: <Location /adm/communicate>
  450: PerlAccessHandler       Apache::lonacc
  451: SetHandler perl-script
  452: PerlHandler Apache::loncommunicate
  453: ErrorDocument     403 /adm/login
  454: ErrorDocument	  500 /adm/errorhandler
  455: </Location>
  456: 
  457: <Location /adm/searchcat>
  458: PerlAccessHandler       Apache::lonacc
  459: SetHandler perl-script
  460: PerlHandler Apache::lonsearchcat
  461: ErrorDocument     403 /adm/login
  462: ErrorDocument	  500 /adm/errorhandler
  463: </Location>
  464: 
  465: <Location /adm/navmaps>
  466: PerlAccessHandler       Apache::lonacc
  467: SetHandler perl-script
  468: PerlHandler Apache::lonnavmaps
  469: ErrorDocument     403 /adm/login
  470: ErrorDocument     406 /adm/roles
  471: ErrorDocument	  500 /adm/errorhandler
  472: </Location>
  473: 
  474: <Location /adm/groupsort>
  475: PerlAccessHandler	Apache::lonacc
  476: SetHandler perl-script
  477: PerlHandler Apache::groupsort
  478: ErrorDocument     403 /adm/login
  479: ErrorDocument	  500 /adm/errorhandler
  480: </Location>
  481: 
  482: <Location /adm/errorhandler>
  483: SetHandler perl-script
  484: PerlHandler Apache::lonerrorhandler
  485: </Location>
  486: 
  487: <LocationMatch "^/adm/help/.*\.hlp$">
  488: SetHandler perl-script
  489: PerlHandler Apache::lonhelp
  490: </LocationMatch>
  491: 
  492: # ------------------------------------------------- Backdoor Adm Tests/Programs
  493: 
  494: <Location /cgi-bin/loncron.pl>
  495: AuthName "LON-CAPA Network Administration"
  496: AuthType Basic
  497: AuthUserFile /home/httpd/lonTabs/htpasswd
  498: require user lonadm
  499: </Location>
  500: 
  501: <Location /cgi-bin/lonversions.pl>
  502: AuthName "LON-CAPA Network Administration"
  503: AuthType Basic
  504: AuthUserFile /home/httpd/lonTabs/htpasswd
  505: require user lonadm
  506: </Location>
  507: 
  508: <Location /cgi-bin/clusterstatus.pl>
  509: AuthName "LON-CAPA Network Administration"
  510: AuthType Basic
  511: AuthUserFile /home/httpd/lonTabs/htpasswd
  512: require user lonadm
  513: </Location>
  514: 
  515: <Location /cgi-bin/metadata_keywords.pl>
  516: AuthName "LON-CAPA Network Administration"
  517: AuthType Basic
  518: AuthUserFile /home/httpd/lonTabs/htpasswd
  519: require user lonadm
  520: </Location>
  521: 
  522: <Location /adm/test>
  523: AuthName "LON-CAPA Network Administration"
  524: AuthType Basic
  525: AuthUserFile /home/httpd/lonTabs/htpasswd
  526: require user lonadm
  527: SetHandler perl-script
  528: PerlAccessHandler Apache::lonacc
  529: PerlHandler Apache::lontest
  530: </Location>
  531: 
  532: # ------------------------------------------------------- Shutting down a child
  533: 
  534: PerlChildExitHandler Apache::lonnet::goodbye
  535: 
  536: #
  537: # LON-CAPA Section (extensions to access.conf permission configuration)
  538: #
  539: # =========================================================== Directory Options
  540: 
  541: # Start out with "no"
  542: 
  543: <Directory />
  544: Options None
  545: AllowOverride None
  546: </Directory>
  547: 
  548: # Yes to symbolic links and server-side includes
  549: 
  550: <Directory /home/httpd/html>
  551: Options Includes FollowSymLinks
  552: AllowOverride None
  553: order allow,deny
  554: allow from all
  555: </Directory>
  556: 
  557: # If it is in cgi-bin, then it can be executed as a CGI script.
  558: 
  559: <Directory /home/httpd/cgi-bin>
  560: AllowOverride None
  561: Options ExecCGI
  562: </Directory>
  563: 
  564: # ============================================================= Access Handlers
  565: 
  566: # ------------------------------------------------- Allow server-status reports
  567: <Location /server-status>
  568: SetHandler server-status
  569: AuthName "LON-CAPA Network Administration"
  570: AuthType Basic
  571: AuthUserFile /home/httpd/lonTabs/htpasswd
  572: require user lonadm
  573: </Location>
  574: 
  575: # ------------------------ Allow LON-CAPA "low-level" connection status reports
  576: <Location /lon-status>
  577: AuthName "LON-CAPA Network Administration"
  578: AuthType Basic
  579: AuthUserFile /home/httpd/lonTabs/htpasswd
  580: require user lonadm
  581: </Location>
  582: 
  583: # ------------------- Allow access to local system documentation from localhost
  584: Alias /doc /usr/doc
  585: <Directory /usr/doc>
  586: order deny,allow
  587: deny from all
  588: allow from localhost
  589: Options Indexes FollowSymLinks
  590: </Directory>
  591: 
  592: # ******** THESE "SHOULD" NEVER BE ALTERED BY THE USER ************************
  593: # ====================================== Internal Settings / Perl Configuration
  594: 
  595: PerlSetVar       lonIDsDir    /home/httpd/lonIDs
  596: PerlSetVar       lonTabDir    /home/httpd/lonTabs
  597: PerlSetVar       lonUsersDir  /home/httpd/lonUsers
  598: PerlSetVar       lonIconsURL  /adm/lonIcons
  599: PerlSetVar       londPort     5663
  600: PerlSetVar       lonSysEMail  korte@lite.msu.edu
  601: PerlSetVar       lonDaemons   /home/httpd/perl
  602: PerlSetVar       lonSockDir   /home/httpd/sockets
  603: PerlSetVar       lonDocRoot   /home/httpd/html
  604: PerlSetVar       lonIncludes  /home/httpd/html/res/adm/includes
  605: PerlSetVar       lonBrowsDet  netscape:mozilla:msie:mozilla\/(\d+\.\d+)\s:9999&explorer:msie:netscape:msie\s(\d+\.\d+)\;:9999&mozilla:mozilla\/[5-9]:msie:mozilla\/(\d+\.\d+)\s:9999&amaya:amaya:mozilla:V(\d+\.\d+)\s:1
  606: 
  607: # -----------------------------------------------------------------------------
  608: # NOTE: lonSqlAccess key is the password for the MySQL user
  609: # www@localhost.  This value must always be "localhostkey".
  610: # The only security risk occurs when somebody logs in as 'www' on your system
  611: # (in which case you have much bigger problems than whether or not they
  612: # can access the non-authoritative loncapa database on your machine).
  613: 
  614: PerlSetVar       lonSqlAccess   localhostkey
  615: 
  616: # -----------------------------------------------------------------------------
  617: 
  618: 
  619: # ====================================== Include machine-specific configuration
  620: 
  621: Include conf/loncapa.conf
  622: 
  623: # ================================================== Initiate mod_perl starting
  624: 
  625: PerlRequire      conf/startup.pl
  626: PerlFreshRestart On

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>