Forum archive 2000-2006

Ted Cox - hardcopy, AliasMatch, /webwork_course_files issues

Ted Cox - hardcopy, AliasMatch, /webwork_course_files issues

by Arnold Pizer -
Number of replies: 0
inactiveTopichardcopy, AliasMatch, /webwork_course_files issues topic started 8/26/2006; 11:04:33 AM
last post 8/26/2006; 4:49:05 PM
userTed Cox - hardcopy, AliasMatch, /webwork_course_files issues  blueArrow
8/26/2006; 11:04:33 AM (reads: 202, responses: 3)
I am running webwork-2.2.1 and have encountered the following:

PROBLEM 1: the url /webwork2_course_files doesn't work, (but /webwork2_files does) and the error message from browser is: the requested URL /webwork2_course_files was not found on this server.

PROBLEM 2: the hardcopy command doesn't work, even though a correct pdf file is produced in the right place, and the error message from browser is: The requested URL /webwork2_course_files/MyTestCourse/tmp/hardcopy/MyTestCourse.ecox.SetNo1.pdf was not found on this server.

(( Shouldn't there be "html" before /tmp ?? ))

SOLUTION: Following the suggestion in

http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$2592

fixes PROBLEM 2, I haven't bothered with PROBLEM 1. But why is the fix needed????

I include below parts of global.conf and webwork.apache-config.

Ted Cox

in the file global.conf:

$webwork_url = "/webwork2";

# Root directory of PG. $pg_dir = "/usr/local/pg-2.2.1";

# URL and path to htdocs directory. $webwork_htdocs_url = "/webwork2_files"; $webwork_htdocs_dir = "$webwork_dir/htdocs";

# URL and path to courses directory. $webwork_courses_url = "/webwork2_course_files"; $webwork_courses_dir = "$webwork_dir/courses";

in the file webwork.apache-config

Set this variable to the path to your WeBWorK installation. my $webwork_dir = "/usr/local/webwork-2.2.1";

AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/$1/html/$2 <Directory $webwork_courses_dir/*/html> Order Allow,Deny Allow from All Options FollowSymLinks AllowOverride None </Directory>

The fix for PROBLEM 2 is to comment out this last stanza and replace it with aliases for each course:

Alias /webwork2_course_files/MyTestCourse /usr/local/webwork-2.2.1/courses/MyTestCourse/html Alias /webwork2_course_files/MyOtherTestCourse /opt/webwork2/courses/MyOtherTestCourse/html <Directory /usr/local//webwork-2.2.1/courses/*/html> Options FollowSymLinks AllowOverride None </Directory>

<| Post or View Comments |>


userSam Hathaway - Re: hardcopy, AliasMatch, /webwork_course_files issues  blueArrow
8/26/2006; 1:47:23 PM (reads: 247, responses: 1)
PROBLEM 1: the url /webwork2_course_files doesn't work, (but /webwork2_files does) and the error message from browser is: the requested URL /webwork2_course_files was not found on this server.

This isn't really a problem. /webwork2_course_files all on its own doesn't point to anything. It needs to be followed by /courseName/ to match the AliasMatch directive.

In your case, however, it seems that the AliasMatch isn't working at all, even when /webwork2_course_files/courseName/... is used.

 

PROBLEM 2: the hardcopy command doesn't work, even though a correct pdf file is produced in the right place, and the error message from browser is: The requested URL /webwork2_course_files/MyTestCourse/tmp/hardcopy/MyTestCourse.ecox.SetNo1.pdf was not found on this server.

This is a result of the weird AliasMatch problem that some people have. We've never seen it at Rochester, and haven't been able to isolate it.

 

(( Shouldn't there be "html" before /tmp ?? ))

No, the "html" is inserted by the AliasMatch directive. It turns URLs like "/webwork2_course_files/courseName/..." into PATHs like "/opt/webwork2/courses/courseName/html/...".

 

SOLUTION: Following the suggestion in http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$2592 fixes PROBLEM 2, I haven't bothered with PROBLEM 1. But why is the fix needed????

There appears to be something wrong with AliasMatch in some situations, but we haven't been able to track it down so far.

Sorry about the unsatisfying solution. Some people have had success by recompiling Apache.
-sam

<| Post or View Comments |>


userDavide P. Cervone - Re: hardcopy, AliasMatch, /webwork_course_files issues  blueArrow
8/26/2006; 2:26:53 PM (reads: 296, responses: 0)
There appears to be something wrong with AliasMatch in some situations, but we haven't been able to track it down so far.

AliasMatch it part of the mod_alias module. Could it be that this module is turned off? Perhaps checking the httpd.conf file to see if the LoadModule alias_module line is commented out would help. (If it is, you need to uncomment both the LoadModule and AddModule for mod_alias).

Davide

<| Post or View Comments |>


userMichael Gage - Re: hardcopy, AliasMatch, /webwork_course_files issues  blueArrow
8/26/2006; 4:49:05 PM (reads: 242, responses: 0)
See also

http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$4291

there is a chance that it is AliasMatch itself which is failing, not WeBWorK or httpd configuration. We're trying to collect data.

<| Post or View Comments |>