################################################################################ # WeBWorK Online Homework Delivery System # Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ # $CVSHeader: webwork2/conf/webwork.apache-config.dist,v 1.10 2005/09/28 23:24:15 gage Exp $ # # This program is free software; you can redistribute it and/or modify it under # the terms of either: (a) the GNU General Public License as published by the # Free Software Foundation; either version 2, or (at your option) any later # version, or (b) the "Artistic License" which comes with this package. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the # Artistic License for more details. ################################################################################ # This file configures Apache to handle requests for WeBWorK. To install WeBWorK # support in your Apache configuration, add the following line to the end of # your Apache configuration file (usually apache.conf or httpd.conf): # # Include /path/to/webwork.apache-config # # Customize the variable $webwork_dir below to match the location of your # WeBWorK installation. # Set this variable to the path to your WeBWorK installation. my $webwork_dir = "/opt/webwork2"; $ENV{WEBWORK_ROOT} = $webwork_dir; #allows the XMLRPC modules to find # the webwork root directory # This code reads global.conf and extracts the remaining configuration # variables. There is no need to modify it. eval "use lib '$webwork_dir/lib'"; die $@ if $@; eval "use WeBWorK::CourseEnvironment"; die $@ if $@; my $ce = new WeBWorK::CourseEnvironment({ webwork_dir => $webwork_dir }); my $webwork_url = $ce->{webwork_url}; my $pg_dir = $ce->{pg_dir}; my $webwork_htdocs_url = $ce->{webwork_htdocs_url}; my $webwork_htdocs_dir = $ce->{webwork_htdocs_dir}; my $webwork_courses_url = $ce->{webwork_courses_url}; my $webwork_courses_dir = $ce->{webwork_courses_dir}; eval "use lib '$pg_dir/lib'"; die $@ if $@; ########################################## # allows Webservice access to WeBWorK ########################################## # eval "use WebworkWebservice";die $@ if $@; #FIXME, is there another way to initialize this? # eval "use RQP"; die $@ if $@; ########################################## $WeBWorK::SeedCE{webwork_dir} = $webwork_dir; # Between the line below and the "EOF" line are the three configuration stanzas # that are used to link Apache with WeBWorK. The following variables may be # included in directives below: # # $webwork_url The base URL handled by Apache::WeBWorK. # $webwork_dir The path to the base webwork2 directory. # $pg_dir The path to the base pg directory. # # $webwork_htdocs_url The base URL of the WeBWorK htdocs directory. # $webwork_htdocs_dir The path to the WeBWorK htdocs directory. # # $webwork_courses_url The base URL of the WeBWorK courses directory. # $webwork_courses_dir The path to the WeBWorK courses directory. # # You may add additional Apache configuration directives, but keep in mind that # variable names are being interpolated (i.e. $foo, @bar). $PerlConfig = < SetHandler perl-script PerlHandler Apache::WeBWorK # Provide access to system-wide resources. # Alias $webwork_htdocs_url $webwork_htdocs_dir Order Allow,Deny Allow from All Options FollowSymLinks AllowOverride None # Provide access to course-specific resources. # AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/\$1/html/\$2 Order Allow,Deny Allow from All Options FollowSymLinks AllowOverride None EOF # The following stanzas can be uncommented to enable various experimental # WeBWorK web services. These are still in testing and have not been audited # for security. # load packages necessary for WeBWorK web services #eval "use WebworkWebservice";die $@ if $@; #eval "use RQP"; die $@ if $@; $PerlConfig .= < # SetHandler perl-script # PerlHandler Apache::XMLRPC::Lite # PerlSetVar dispatch_to "WebworkXMLRPC" # PerlSetVar options "compress_threshold => 10000" # Order Allow,Deny # Allow from All # ########## RQP installation ########## # ## ## SetHandler perl-script ## PerlHandler Apache::SOAP ## PerlSetVar dispatch_to "RQP" ## PerlSetVar options "compress_threshold => 10000" ## Order Allow,Deny ## Allow from All ## # # SetHandler perl-script # PerlHandler MySOAP # Order Allow,Deny # Allow from All # # SOAP installation # # # SetHandler perl-script # PerlHandler Apache::SOAP # PerlSetVar dispatch_to "WebworkXMLRPC" # PerlSetVar options "compress_threshold => 10000" # Order Allow,Deny # Allow from All # EOF