[system] / trunk / webwork2 / conf / webwork.apache-config.dist Repository:
ViewVC logotype

View of /trunk/webwork2/conf/webwork.apache-config.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2497 - (download) (annotate)
Mon Jul 12 04:16:14 2004 UTC (8 years, 11 months ago) by sh002i
File size: 3740 byte(s)
change name of htpasswd file to .htpasswd (as is typical).

    1 ################################################################################
    2 # WeBWorK Online Homework Delivery System
    3 # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
    4 # $CVSHeader: webwork-modperl/conf/webwork.apache-config.dist,v 1.1 2004/07/12 02:30:21 sh002i Exp $
    5 #
    6 # This program is free software; you can redistribute it and/or modify it under
    7 # the terms of either: (a) the GNU General Public License as published by the
    8 # Free Software Foundation; either version 2, or (at your option) any later
    9 # version, or (b) the "Artistic License" which comes with this package.
   10 #
   11 # This program is distributed in the hope that it will be useful, but WITHOUT
   12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   13 # FOR A PARTICULAR PURPOSE.  See either the GNU General Public License or the
   14 # Artistic License for more details.
   15 ################################################################################
   16 
   17 # This file configures Apache to handle requests for WeBWorK. To install WeBWorK
   18 # support in your Apache configuration, add the following line to the end of
   19 # your Apache configuration file (usually apache.conf or httpd.conf):
   20 #
   21 #     Include /path/to/webwork.apache-config
   22 #
   23 # Customize the variables $webwork_url, $webwork_dir, $pg_dir, etc. below to
   24 # match your installation and preferences.
   25 
   26 ################################################################################
   27 # WeBWorK configuration
   28 ################################################################################
   29 
   30 <Perl>
   31 
   32 # The following variables are the main configuration variables for WeBWorK.
   33 # They are used in the Apache configuration below and to seed the WeBWorK
   34 # configuration file global.conf.
   35 
   36 my ($webwork_url, $webwork_dir, $pg_dir, $webwork_htdocs_url,
   37 $webwork_htdocs_dir, $webwork_courses_url, $webwork_courses_dir);
   38 
   39 BEGIN {
   40   # Root directories of WeBWorK and PG.
   41   $webwork_url         = "/webwork2";
   42   $webwork_dir         = "/opt/webwork2";
   43   $pg_dir              = "/opt/pg";
   44 
   45   # URL and path to htdocs directory.
   46   $webwork_htdocs_url  = "/webwork2_files";
   47   $webwork_htdocs_dir  = "$webwork_dir/htdocs";
   48 
   49   # URL and path to courses directory.
   50   $webwork_courses_url = "/webwork2_course_files";
   51   $webwork_courses_dir = "$webwork_dir/courses";
   52 }
   53 
   54 # Between the line below and the "EOF" line are the three configuration stanzas
   55 # that are used to link Apache with WeBWorK. You may add additional Apache
   56 # configuration directives there, but keep in mind that variable names are being
   57 # interpolated (i.e. $foo, @bar).
   58 
   59 $PerlConfig = <<EOF;
   60 
   61 # Define the location that is handled by the Apache::WeBWorK module, and tell
   62 # Perl where to find the libraries Apache::WeBWorK needs to run.
   63 #
   64 <Location $webwork_url>
   65   SetHandler perl-script
   66   PerlHandler Apache::WeBWorK
   67 </Location>
   68 
   69 # Provide access to system-wide resources.
   70 #
   71 Alias $webwork_htdocs_url $webwork_htdocs_dir
   72 <Directory $webwork_htdocs_dir>
   73   Options None
   74   AllowOverride None
   75 </Directory>
   76 
   77 # Provide access to course-specific resources.
   78 #
   79 AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/\$1/html/\$2
   80 <Directory $webwork_courses_dir/*/html>
   81   Options FollowSymLinks
   82   AllowOverride None
   83 </Directory>
   84 
   85 EOF
   86 
   87 # No user-serviceable parts below. ;-)
   88 
   89 # Add library directories to include path.
   90 use lib "$webwork_dir/lib";
   91 use lib "$pg_dir/lib";
   92 
   93 # Share configuration variables with WeBWorK.
   94 %WeBWorK::SeedCE = (
   95   webwork_url         => $webwork_url,
   96   webwork_dir         => $webwork_dir,
   97   pg_dir              => $pg_dir,
   98   webwork_htdocs_url  => $webwork_htdocs_url,
   99   webwork_htdocs_dir  => $webwork_htdocs_dir,
  100   webwork_courses_url => $webwork_courses_url,
  101   webwork_courses_dir => $webwork_courses_dir,
  102 );
  103 
  104 </Perl>

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9