################################################################################ # WeBWorK Online Homework Delivery System # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ # $CVSHeader: webwork2/conf/devel.apache-config.dist,v 1.2 2004/07/12 03:48:48 sh002i 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 is an Apache configuration file suitable for use when doing development # on the WeBWorK 2 system. This setup allows each developer to run an # independent Apache server under their own UID, using their own working copy of # the WeBWorK code. The configuration is split into three parts: # # The first part is a site-specific (but user-indepenent) file named # devel-site.apache-config. It contains directives that are common to all # development servers on the same host. The site administrator can chose to # maintain a single copy of this file and have all developers reference it in a # central location. # # The second part is the stock webwork.apache-config file that is used for # normal installations. Customize this file, setting the $webwork_url, # $webwork_dir, $pg_dir, etc. appropriatly for your development server. # # The third part is this file. It contains the user-specific directives that are # specific to each developer's server. ################################################################################ # Include site-specific configuration ################################################################################ Include /path/to/webwork2/conf/devel-site.apache-config ################################################################################ # Include WeBWorK configuration ################################################################################ Include /path/to/webwork2/conf/webwork.apache-config ################################################################################ # Perform user-specific configuration ################################################################################ my $user_name = (getpwuid $>)[0]; my $group_name = (getgrgid $))[0]; my $host_name = Apache->server->server_hostname; # The server will run as the user who starts it. $User = $user_name; $Group = $group_name; # It will listen on a port equal to the UID of the user who starts it + 10000. $Port = $> + 10000; # Email address of server administator. $ServerAdmin = "$user_name\@$host_name"; # Locations of some files. $LockFile = "$WeBWorK::SeedCE{webwork_dir}/logs/httpd.lock"; $PidFile = "$WeBWorK::SeedCE{webwork_dir}/logs/httpd.pid"; $ErrorLog = "$WeBWorK::SeedCE{webwork_dir}/logs/error.log"; # Control the number of child processes and how long they stick around. $StartServers = 2; $MinSpareServers = 2; $MaxSpareServers = 2; $MaxClients = 150; $MaxRequestsPerChild = 100; # The document root doesn't really matter, but it has to be set, so we set it to # the htdocs directory. $DocumentRoot = $WeBWorK::SeedCE{webwork_htdocs_dir}; # You may want to add access control to prevent interlopers from monkeying with # your development system. This is a really good idea, since there could # potentially be security holes in the code. Create a file named .htpasswd in # the conf containing accounts for those allowed to access your development # system: # # htpasswd -c .htpasswd user-name #$Location{"/"} = { # AuthType => "Basic", # AuthName => "\"$user_name's WeBWorK development system\"", # ' requires extra "" # AuthUserFile => "$WeBWorK::SeedCE{webwork_dir}/conf/.htpasswd", # Require => "valid-user", #}; ################################################################################ # Stick any local additions down here ################################################################################