Parent Directory
|
Revision Log
forward port of changes to rel-2-4-5
1 ################################################################################ 2 # WeBWorK Online Homework Delivery System 3 # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ 4 # $CVSHeader: webwork2/conf/webwork.apache-config.dist,v 1.23 2008/06/24 22:54:04 gage 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 below to match your WeBWorK installation. 24 25 # Uncomment the ScriptAliasMatch to allow access to show-source.cgi 26 # This allows the "show source" button to work for demonstration "courses" 27 # See for example Davide Cervone's Knoxville lectures on math objects 28 29 #ScriptAliasMatch /webwork2_course_files/([^/]*)/show-source.cgi/(.*) /opt/webwork/courses/$1/html/show-source.cgi/$2 30 31 32 <Perl> 33 34 # Set this variable to the path to your WeBWorK installation. 35 my $webwork_dir = "/opt/webwork/webwork2"; 36 37 # This code reads global.conf and extracts the remaining configuration 38 # variables. There is no need to modify it. 39 eval "use lib '$webwork_dir/lib'"; die $@ if $@; 40 eval "use WeBWorK::CourseEnvironment"; die $@ if $@; 41 my $ce = new WeBWorK::CourseEnvironment({ webwork_dir => $webwork_dir }); 42 my $webwork_url = $ce->{webwork_url}; 43 my $pg_dir = $ce->{pg_dir}; 44 my $webwork_htdocs_url = $ce->{webwork_htdocs_url}; 45 my $webwork_htdocs_dir = $ce->{webwork_htdocs_dir}; 46 my $webwork_courses_url = $ce->{webwork_courses_url}; 47 my $webwork_courses_dir = $ce->{webwork_courses_dir}; 48 eval "use lib '$pg_dir/lib'"; die $@ if $@; 49 50 require Apache::WeBWorK; # force compilation of pretty much everything 51 52 $WeBWorK::SeedCE{webwork_dir} = $webwork_dir; 53 54 # At this point, the following configuration variables should be present for use 55 # in wiring WeBWorK into Apache: 56 # 57 # $webwork_url The base URL handled by Apache::WeBWorK. 58 # $webwork_dir The path to the base webwork2 directory. 59 # $pg_dir The path to the base pg directory. 60 # 61 # $webwork_htdocs_url The base URL of the WeBWorK htdocs directory. 62 # $webwork_htdocs_dir The path to the WeBWorK htdocs directory. 63 # 64 # $webwork_courses_url The base URL of the WeBWorK courses directory. 65 # $webwork_courses_dir The path to the WeBWorK courses directory. 66 67 # Define the location that is handled by the Apache::WeBWorK module, and tell 68 # Perl where to find the libraries Apache::WeBWorK needs to run. 69 # 70 $Location{$webwork_url} = { 71 SetHandler => "perl-script", 72 PerlHandler => "Apache::WeBWorK", 73 }; 74 75 # Provide access to system-wide resources. 76 # 77 push @Alias, [ $webwork_htdocs_url => $webwork_htdocs_dir ]; 78 $Directory{$webwork_htdocs_dir} = { 79 Order => "allow,deny", 80 Allow => "from all", 81 Options => "FollowSymLinks", 82 AllowOverride => "none", 83 }; 84 85 # Provide access to course-specific resources. 86 # 87 push @AliasMatch, [ "$webwork_courses_url/([^/]*)/(.*)", "$webwork_courses_dir/\$1/html/\$2" ]; 88 $Directory{"$webwork_courses_dir/*/html"} = { 89 Order => "allow,deny", 90 Allow => "from all", 91 Options => "FollowSymLinks", 92 AllowOverride => "none", 93 }; 94 95 # If WeBWorK is on the root, exempt the static directories from being handled 96 # by Apache::WeBWorK. 97 # 98 if ($webwork_url eq "") { 99 $Location{$webwork_courses_url} = { SetHandler => "none" }; 100 $Location{$webwork_htdocs_url} = { SetHandler => "none" }; 101 } 102 103 104 # The following stanzas can be uncommented to enable various experimental 105 # WeBWorK web services. These are still in testing and have not been audited 106 # for security. 107 108 # uncomment the line below if you use the XMLRPC, RQP, or SOAP installations below 109 110 $ENV{WEBWORK_ROOT} = $webwork_dir; 111 112 $PerlConfig .= <<EOF; 113 114 # ##### Sam's WeBWorK::Request-based XML-RPC testbed ##### 115 # # 116 # #PerlModule WeBWorK::RPC 117 # #<Location /webwork2_rpc> 118 # # SetHandler perl-script 119 # # PerlHandler Apache::XMLRPC::Lite 120 # # PerlSetVar dispatch_to "WeBWorK::RPC WeBWorK::RPC::CourseManagement" 121 # #</Location> 122 # 123 # ########## XMLRPC installation ########## 124 # # 125 # #PerlModule WebworkWebservice 126 # #<Location /mod_xmlrpc> 127 # # SetHandler perl-script 128 # # PerlHandler Apache::XMLRPC::Lite 129 # # PerlSetVar dispatch_to "WebworkXMLRPC" 130 # # PerlSetVar options "compress_threshold => 10000" 131 # # Order Allow,Deny 132 # # Allow from All 133 # #</Location> 134 # 135 # ########## RQP installation ########## 136 # # 137 # #PerlModule RQP 138 # ##<Location /rqp> 139 # ## SetHandler perl-script 140 # ## PerlHandler Apache::SOAP 141 # ## PerlSetVar dispatch_to "RQP" 142 # ## PerlSetVar options "compress_threshold => 10000" 143 # ## Order Allow,Deny 144 # ## Allow from All 145 # ##</Location> 146 # #<Location /rqp> 147 # # SetHandler perl-script 148 # # PerlHandler MySOAP 149 # # Order Allow,Deny 150 # # Allow from All 151 # #</Location> 152 # 153 # ########## SOAP installation ########## 154 # # 155 # #PerlModule WebworkWebservice 156 # #<Location /mod_soap> 157 # # SetHandler perl-script 158 # # PerlHandler Apache::SOAP 159 # # PerlSetVar dispatch_to "WebworkXMLRPC" 160 # # PerlSetVar options "compress_threshold => 10000" 161 # # Order Allow,Deny 162 # # Allow from All 163 # #</Location> 164 # 165 # PerlModule WebworkSOAP 166 167 # #WEBWORK SOAP CONFIGURATION 168 # <Location /webwork2_rpc> 169 # PerlHandler Apache::SOAP 170 # SetHandler perl-script 171 # PerlSetVar dispatch_to "WebworkSOAP" 172 # PerlSetVar options "compress_threshold => 10000" 173 # Order Allow,Deny 174 # Allow from All 175 # </Location> 176 177 # #WEBWORK SOAP WSDL HANDLER :: TO BE REPLACED WITH A FILE FOR PRODUCTION SERVERS 178 # <Location /webwork2_wsdl> 179 # PerlSetVar dispatch_to "WebworkSOAP::WSDL" 180 # PerlSetVar options "compress_threshold => 10000" 181 # PerlHandler WebworkSOAP::WSDL 182 # SetHandler perl-script 183 # Order Allow,Deny 184 # Allow from All 185 # </Location> 186 187 EOF 188 189 </Perl> 190
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |