Parent Directory
|
Revision Log
Revision 3973 -
(view)
(download)
Original Path: trunk/webwork2/conf/devel.apache-config.dist
| 1 : | sh002i | 2492 | ################################################################################ |
| 2 : | # WeBWorK Online Homework Delivery System | ||
| 3 : | sh002i | 3973 | # Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 : | # $CVSHeader: webwork2/conf/devel.apache-config.dist,v 1.7 2005/06/28 00:14:18 sh002i Exp $ | ||
| 5 : | sh002i | 2492 | # |
| 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 is an Apache configuration file suitable for use when doing development | ||
| 18 : | # on the WeBWorK 2 system. This setup allows each developer to run an | ||
| 19 : | # independent Apache server under their own UID, using their own working copy of | ||
| 20 : | # the WeBWorK code. The configuration is split into three parts: | ||
| 21 : | # | ||
| 22 : | # The first part is a site-specific (but user-indepenent) file named | ||
| 23 : | # devel-site.apache-config. It contains directives that are common to all | ||
| 24 : | # development servers on the same host. The site administrator can chose to | ||
| 25 : | # maintain a single copy of this file and have all developers reference it in a | ||
| 26 : | # central location. | ||
| 27 : | # | ||
| 28 : | # The second part is the stock webwork.apache-config file that is used for | ||
| 29 : | gage | 3070 | # normal installations. Customize this file, setting the $webwork_url, |
| 30 : | # $webwork_dir, $pg_dir, etc. appropriatly for your development server. | ||
| 31 : | sh002i | 2492 | # |
| 32 : | # The third part is this file. It contains the user-specific directives that are | ||
| 33 : | # specific to each developer's server. | ||
| 34 : | |||
| 35 : | ################################################################################ | ||
| 36 : | # Include site-specific configuration | ||
| 37 : | ################################################################################ | ||
| 38 : | |||
| 39 : | Include /path/to/webwork2/conf/devel-site.apache-config | ||
| 40 : | |||
| 41 : | ################################################################################ | ||
| 42 : | # Include WeBWorK configuration | ||
| 43 : | ################################################################################ | ||
| 44 : | |||
| 45 : | Include /path/to/webwork2/conf/webwork.apache-config | ||
| 46 : | |||
| 47 : | ################################################################################ | ||
| 48 : | # Perform user-specific configuration | ||
| 49 : | ################################################################################ | ||
| 50 : | |||
| 51 : | <Perl> | ||
| 52 : | |||
| 53 : | my $user_name = (getpwuid $>)[0]; | ||
| 54 : | my $group_name = (getgrgid $))[0]; | ||
| 55 : | my $host_name = Apache->server->server_hostname; | ||
| 56 : | |||
| 57 : | # The server will run as the user who starts it. | ||
| 58 : | $User = $user_name; | ||
| 59 : | $Group = $group_name; | ||
| 60 : | |||
| 61 : | sh002i | 3317 | # It will listen on a port equal to the UID of the user who starts it +7000. |
| 62 : | # This effectively picks a port between 8000 and 8999 since UID's are >=1000. | ||
| 63 : | $Port = $> + 7000; | ||
| 64 : | sh002i | 2492 | |
| 65 : | # Email address of server administator. | ||
| 66 : | $ServerAdmin = "$user_name\@$host_name"; | ||
| 67 : | |||
| 68 : | # Locations of some files. | ||
| 69 : | $LockFile = "$WeBWorK::SeedCE{webwork_dir}/logs/httpd.lock"; | ||
| 70 : | $PidFile = "$WeBWorK::SeedCE{webwork_dir}/logs/httpd.pid"; | ||
| 71 : | $ErrorLog = "$WeBWorK::SeedCE{webwork_dir}/logs/error.log"; | ||
| 72 : | |||
| 73 : | # Control the number of child processes and how long they stick around. | ||
| 74 : | $StartServers = 2; | ||
| 75 : | $MinSpareServers = 2; | ||
| 76 : | $MaxSpareServers = 2; | ||
| 77 : | $MaxClients = 150; | ||
| 78 : | $MaxRequestsPerChild = 100; | ||
| 79 : | |||
| 80 : | # The document root doesn't really matter, but it has to be set, so we set it to | ||
| 81 : | # the htdocs directory. | ||
| 82 : | $DocumentRoot = $WeBWorK::SeedCE{webwork_htdocs_dir}; | ||
| 83 : | |||
| 84 : | # You may want to add access control to prevent interlopers from monkeying with | ||
| 85 : | # your development system. This is a really good idea, since there could | ||
| 86 : | sh002i | 2501 | # potentially be security holes in the code. Create a file named .htpasswd in |
| 87 : | # the conf containing accounts for those allowed to access your development | ||
| 88 : | # system: | ||
| 89 : | # | ||
| 90 : | # htpasswd -c .htpasswd user-name | ||
| 91 : | sh002i | 2492 | |
| 92 : | sh002i | 2494 | #$Location{"/"} = { |
| 93 : | # AuthType => "Basic", | ||
| 94 : | # AuthName => "\"$user_name's WeBWorK development system\"", # ' requires extra "" | ||
| 95 : | # AuthUserFile => "$WeBWorK::SeedCE{webwork_dir}/conf/.htpasswd", | ||
| 96 : | # Require => "valid-user", | ||
| 97 : | #}; | ||
| 98 : | sh002i | 2492 | |
| 99 : | </Perl> | ||
| 100 : | |||
| 101 : | ################################################################################ | ||
| 102 : | # Stick any local additions down here | ||
| 103 : | ################################################################################ | ||
| 104 : | |||
| 105 : | gage | 3189 | #Alias /segue /home/gage/webwork/webwork-modperl/htdocs/segue |
| 106 : | #Alias /moodle /home/gage/webwork/webwork-modperl/htdocs/moodle |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |