[system] / trunk / webwork-modperl / conf / devel.apache-config.dist Repository:
ViewVC logotype

View of /trunk/webwork-modperl/conf/devel.apache-config.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5319 - (download) (annotate)
Mon Aug 13 22:59:59 2007 UTC (5 years, 9 months ago) by sh002i
File size: 4753 byte(s)
updated copyright dates

    1 ################################################################################
    2 # WeBWorK Online Homework Delivery System
    3 # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
    4 # $CVSHeader: webwork2/conf/devel.apache-config.dist,v 1.11 2006/09/01 14:16:36 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 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 # normal installations. Customize this file, setting the $webwork_url,
   30 # $webwork_dir, $pg_dir, etc. appropriatly for your development server.
   31 #
   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 # 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 
   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/httpd-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 # 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 
   92 #$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 
   99 </Perl>
  100 
  101 <IfDefine SSL>
  102     SSLEngine On
  103     SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  104     SSLCertificateFile /usr/local/etc/apache/ssl.crt/server.crt
  105     SSLCertificateKeyFile /usr/local/etc/apache/ssl.key/server.key
  106 </IfDefine>
  107 
  108 ################################################################################
  109 # Stick any local additions down here
  110 ################################################################################
  111 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9