## Forum archive 2000-2006

### Ted Cox - hardcopy, AliasMatch, /webwork_course_files issues

by Arnold Pizer -
Number of replies: 0
 hardcopy, AliasMatch, /webwork_course_files issues topic started 8/26/2006; 11:04:33 AMlast post 8/26/2006; 4:49:05 PM
 Ted Cox - hardcopy, AliasMatch, /webwork_course_files issues  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 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 Order Allow,Deny Allow from All Options FollowSymLinks AllowOverride None 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 Options FollowSymLinks AllowOverride None <| Post or View Comments |>  Sam Hathaway - Re: hardcopy, AliasMatch, /webwork_course_files issues 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 |>

 Davide P. Cervone - Re: hardcopy, AliasMatch, /webwork_course_files issues  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 |>

 Michael Gage - Re: hardcopy, AliasMatch, /webwork_course_files issues  8/26/2006; 4:49:05 PM (reads: 242, responses: 0) See also 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 |>