Parent Directory
|
Revision Log
webwork2 and pg dirs are in /opt/webwork by default now
1 ################################################################################ 2 # WeBWorK Online Homework Delivery System 3 # Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ 4 # $CVSHeader: webwork2/conf/webwork.apache-config.dist,v 1.13 2006/08/03 16:28:48 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 variable $webwork_dir below to match the location of your 24 # WeBWorK installation. 25 26 <Perl> 27 28 # Set this variable to the path to your WeBWorK installation. 29 my $webwork_dir = "/opt/webwork/webwork2"; 30 31 # This code reads global.conf and extracts the remaining configuration 32 # variables. There is no need to modify it. 33 eval "use lib '$webwork_dir/lib'"; die $@ if $@; 34 eval "use WeBWorK::CourseEnvironment"; die $@ if $@; 35 my $ce = new WeBWorK::CourseEnvironment({ webwork_dir => $webwork_dir }); 36 my $webwork_url = $ce->{webwork_url}; 37 my $pg_dir = $ce->{pg_dir}; 38 my $webwork_htdocs_url = $ce->{webwork_htdocs_url}; 39 my $webwork_htdocs_dir = $ce->{webwork_htdocs_dir}; 40 my $webwork_courses_url = $ce->{webwork_courses_url}; 41 my $webwork_courses_dir = $ce->{webwork_courses_dir}; 42 eval "use lib '$pg_dir/lib'"; die $@ if $@; 43 44 $WeBWorK::SeedCE{webwork_dir} = $webwork_dir; 45 46 # Between the line below and the "EOF" line are the three configuration stanzas 47 # that are used to link Apache with WeBWorK. The following variables may be 48 # included in directives below: 49 # 50 # $webwork_url The base URL handled by Apache::WeBWorK. 51 # $webwork_dir The path to the base webwork2 directory. 52 # $pg_dir The path to the base pg directory. 53 # 54 # $webwork_htdocs_url The base URL of the WeBWorK htdocs directory. 55 # $webwork_htdocs_dir The path to the WeBWorK htdocs directory. 56 # 57 # $webwork_courses_url The base URL of the WeBWorK courses directory. 58 # $webwork_courses_dir The path to the WeBWorK courses directory. 59 # 60 # You may add additional Apache configuration directives, but keep in mind that 61 # variable names are being interpolated (i.e. $foo, @bar). 62 63 $PerlConfig = <<EOF; 64 65 # Define the location that is handled by the Apache::WeBWorK module, and tell 66 # Perl where to find the libraries Apache::WeBWorK needs to run. 67 # 68 <Location $webwork_url> 69 SetHandler perl-script 70 PerlHandler Apache::WeBWorK 71 </Location> 72 73 # Provide access to system-wide resources. 74 # 75 Alias $webwork_htdocs_url $webwork_htdocs_dir 76 <Directory $webwork_htdocs_dir> 77 Order Allow,Deny 78 Allow from All 79 Options FollowSymLinks 80 AllowOverride None 81 </Directory> 82 83 # Provide access to course-specific resources. 84 # 85 AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/\$1/html/\$2 86 <Directory $webwork_courses_dir/*/html> 87 Order Allow,Deny 88 Allow from All 89 Options FollowSymLinks 90 AllowOverride None 91 </Directory> 92 93 EOF 94 95 # The following stanzas can be uncommented to enable various experimental 96 # WeBWorK web services. These are still in testing and have not been audited 97 # for security. 98 99 # uncomment if you use the XMLRPC, RQP, or SOAP installations below 100 #$ENV{WEBWORK_ROOT} = $webwork_dir; 101 102 $PerlConfig .= <<EOF; 103 104 ##### Sam's WeBWorK::Request-based XML-RPC testbed ##### 105 # 106 #PerlModule WeBWorK::RPC 107 #<Location /webwork2_rpc> 108 # SetHandler perl-script 109 # PerlHandler Apache::XMLRPC::Lite 110 # PerlSetVar dispatch_to "WeBWorK::RPC WeBWorK::RPC::CourseManagement" 111 #</Location> 112 113 ########## XMLRPC installation ########## 114 # 115 #PerlModule WebworkWebservice 116 #<Location /mod_xmlrpc> 117 # SetHandler perl-script 118 # PerlHandler Apache::XMLRPC::Lite 119 # PerlSetVar dispatch_to "WebworkXMLRPC" 120 # PerlSetVar options "compress_threshold => 10000" 121 # Order Allow,Deny 122 # Allow from All 123 #</Location> 124 125 ########## RQP installation ########## 126 # 127 #PerlModule RQP 128 ##<Location /rqp> 129 ## SetHandler perl-script 130 ## PerlHandler Apache::SOAP 131 ## PerlSetVar dispatch_to "RQP" 132 ## PerlSetVar options "compress_threshold => 10000" 133 ## Order Allow,Deny 134 ## Allow from All 135 ##</Location> 136 #<Location /rqp> 137 # SetHandler perl-script 138 # PerlHandler MySOAP 139 # Order Allow,Deny 140 # Allow from All 141 #</Location> 142 143 ########## SOAP installation ########## 144 # 145 #PerlModule WebworkWebservice 146 #<Location /mod_soap> 147 # SetHandler perl-script 148 # PerlHandler Apache::SOAP 149 # PerlSetVar dispatch_to "WebworkXMLRPC" 150 # PerlSetVar options "compress_threshold => 10000" 151 # Order Allow,Deny 152 # Allow from All 153 #</Location> 154 155 EOF 156 157 </Perl>
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |