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