## Forum archive 2000-2006

### Michael Gage - Notes on configuring webwork-modperl

by Arnold Pizer -
Number of replies: 0
 Notes on configuring webwork-modperl topic started 6/16/2003; 10:35:56 AMlast post 6/16/2003; 10:35:56 AM
Michael Gage - Notes on configuring webwork-modperl
6/16/2003; 10:35:56 AM (reads: 670, responses: 0)

### Notes on configuring webwork-modperl

I am setting up my installation of webwork-modperl after we have switched the CVS from one machine to another. These are the notes for the changes I make in the configuration files. Our setup is somewhat special, since we have four developers on one machine, so these changes may not be correct for everyone.

#### You need to create local versions of the following files so that you can customize them.

http-wwmp.conf, global.conf gdbm.conf and sql.conf

#### Changes to http-wwmp.conf

1. Global find and replace !WEBWORK_ROOT! by /home/gage/webwork/webwork-modperl (this is where my development directory is located.)
2. Global find and replace of !WEBWORK_USER! with gage
3. Global find and replace of !WEBWORK_PORT! with 11002. This is definitely non-standard, because I am working with a development version. Usually the port would be 80.
4. Global find and replace of !PG_ROOT! with /home/gage/webwork/pg which is where I keep the pg root which is shared by WeBWork1.x and WeBWorK2.
5. For using WeBWorK 1.8 I add this section:
6. 				########## WeBWorK 1.8 ##########				#				# WeBWorK 1.8 installation				#				ScriptAlias /webwork-1.8/ "/home/gage/webwork/system/cgi/"				Alias /courses/  /webwork/shared-courses-links/				<Directory "/home/gage/webwork/system/cgi/">					Options ExecCGI					AllowOverride None					Order allow,deny					Allow from all				</Directory>
7. For profiling I add the following statements
8. 				Add this to /webwork2 location definition					PerlModule Apache::DProf				Add to top material					ServerRoot   /home/gage/webwork/webwork-modperl					tells DProf where to find logs directory

#### Changes to global.conf

Where the courses are located

			%webworkDirs = (				root    => "$webworkRoot", bin => "$webworkRoot/bin",				conf    => "$webworkRoot/conf", courses => "/webwork/shared-courses", # "$webworkRoot/courses",				lib     => "$webworkRoot/lib", logs => "$webworkRoot/logs",				macros  => "$pgRoot/macros", tmp => "$webworkRoot/tmp",			);

and where the old WeBWorK1.8 system instructor pages are located

			%webworkURLs = (				root    => "\$webworkURLRoot",				home    => "/webwork2_files/index.html",				htdocs  => "/webwork2_files",				docs    => "http://webhost.math.rochester.edu/webworkdocs/docs",				oldProf => "http://webwork3.math.rochester.edu:11002/webwork-1.8/cgi-scripts/profLogin.pl",			);

gdbm.conf and sql.conf have no changes, at least initially

#### Tests:

After restarting the server:

http://webwork3.math.rochester.edu:11002/ww_status
This gives me output starting with Embedded Perl version v5.6.1 for Apache/1.3.27 (Unix) mod_perl/1.27 process 91936 , running since Mon Jun 16 13:48:52 2003  and followed by several links.
This assures me that mod_perl is working and reading the httpd.conf file that I just modified.
http://webwork3.math.rochester.edu:11002/webwork2_files/index.html
This should return Welcome to WeBWorK at the University of Rochester which is the contents of the file WEBWORK_ROOT/htdocs/index.html . This indicates that the link to WEBWORK_ROOT/htdocs is set up properly.
You can modify this file to name your institution and add anything else you like.
http://webwork3.math.rochester.edu:11002/webwork2
This should be redirected to the address at webwork2_files above and will give the same output. This indicates that the dispatcher for WeBWorK2 is working.
http://webwork3.math.rochester.edu:11002/webwork2/mth143
mth143 is a course in the /shared-courses/ directory. (This location for courses was specified in global.conf.)

Error message: perhaps you forgot to load "WeBWorK::DB::Driver::Null"

#### Sample errors:

Can't open file /home/gage/webwork/pg/macros/IO.pl for reading Can't open file /home/gage/webwork/pg/macros/PG.pl for reading Can't open file /home/gage/webwork/pg/macros/dangerousMacros.pl for reading 
I had forgotten to check out the pg directory! It's also possible that the permissions on the pg directories and subdirectories don't allow the server to access the files. Check (1) that the pg directory exists (2) that the permissions are reasonable for the server. and (3) That the address of PG_ROOT in the httpd.conf file is pointing to the pg directory.

<| Post or View Comments |>