Forum archive 2000-2006

Zbigniew Fiedorowicz - Installation problems with WWK2

Zbigniew Fiedorowicz - Installation problems with WWK2

by Arnold Pizer -
Number of replies: 0
inactiveTopicInstallation problems with WWK2 topic started 8/3/2004; 11:59:59 PM
last post 12/23/2004; 12:20:42 PM
userZbigniew Fiedorowicz - Installation problems with WWK2  blueArrow
8/3/2004; 11:59:59 PM (reads: 1339, responses: 4)
Hi,

I'm having an installation problem with WWK2: the URL /webwork2_course_files doesn't work (in particular hardcopy generation --> 404 Not Found). The problem seems to be due to the following line of webwork.apache-config:

AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/$1/html/$2

If I replace this line with

Alias /webwork2_course_files /var/www/webwork2/webwork-modperl/courses/

and put a symlink tmp --> html/tmp in my course files, then hardcopy generation DOES work.

Also if I try instead

Alias $webwork_courses_ur $webwork_courses_dir

I get an error message

mod_perl: Alias takes two arguments, a fakename and a realname

when I start up httpd as well as 404 Not Found errors with /webwork2_course_files

Also I couldn't figure out what the WWK2 UI is for assigning a paperHeader.pg file for hardcopy generation.

TIA, Zig

<| Post or View Comments |>


userMark Hamrick - Re: Installation problems with WWK2  blueArrow
12/22/2004; 3:01:10 PM (reads: 1434, responses: 0)
Is the final answer to this issue? It solved my problem, but I don't want to have to create the link every time an admin creates a new course.

Thanks, Mark

<| Post or View Comments |>


userMichael Gage - Re: Installation problems with WWK2  blueArrow
12/22/2004; 3:35:17 PM (reads: 1394, responses: 0)
Zig addresses several problems, above. I'm assuming that you are referring to the AliasMatch work around. First, here are the relevant lines from our webwork.apache-config file.

 

# Provide access to course-specific resources.
#
AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/$1/html/$2
<Directory $webwork_courses_dir/*/html>
Order deny,allow
Deny from all
Allow from all
Options FollowSymLinks
AllowOverride None
</Directory>

The $1 reference should be to a course name myCourseName while $2 will have the remainder of the url.

The goal is to redirect urls addressed to myCourseName/... to the appropriate myCourseName/html/... directory and subdirectories. (One doesn't want all of the myCourseName directory to be available for inspection from the web!! )

One of the subdirectories is typically tmp with subdirectories tmp/hardcopy, tmp/gif, tmp/png, tmp/html . Pictures, equations or external html documents are saved to these locations and the browser is directed to pick them up at those locations.

Failure to get hardcopy could be caused by having a mismatch between the location where the hardcopy is generated and the url for this location. It can also be caused by incorrect permissions on the directory -- either permissions defined in the browser or permissions defined by unix. You should be able to trouble shoot this by putting a test.html file in the various directories by hand and trying to reach them from the web. The locations and urls are defined in global.conf.

While defining a unix alias will work around the problem, it really shouldn't be necessary unless AliasMatch doesn't function on your version of Apache. If AliasMatch doesn't work we'd like to know about it on the bulletin board so that we tell those using those installations that they will need to use a workaround.

Hope this helps.

--Mike

<| Post or View Comments |>


userMark Hamrick - Re: Installation problems with WWK2  blueArrow
12/23/2004; 10:12:14 AM (reads: 1371, responses: 0)
Mike,

I am using Apache 1.3.33, Modperl 1.29 on Fedora Core 2. If I use Zig's solution, I am able to see the test.html files. If I use the lines above, I am not able to see the test.html files that I have created.

Thanks, Mark

<| Post or View Comments |>


userMichael Gage - Re: Installation problems with WWK2  blueArrow
12/23/2004; 12:20:42 PM (reads: 1428, responses: 0)
It seems we can break the problem down as follows:

either AliasMatch is not working or is turned off

or

One or the other values $webwork_courses_url or $webwork_courses_dir is not what you expect it to be.

To check the first one see if you can get AliasMatch to work by inserting it directly into the httpd.conf file. Use the literal values of the variable above (taken from global.conf, or use a directory that you already know works.). By the way make sure that mod_alias is turned on.

If the directive works when inserted in the httpd.conf file, try it again in the webwork.apache-config file, but use literal values instead of $webwork_courses_url and $webwork_courses_dir

If that works, then you've narrowed it down to getting the values of these two varibles set correctly. You can use warn messages to print out the value of the variables to the apache error log.

Given the error message for Alias in Zig's example above, I wonder if one or the other of the two variables may have been empty or otherwise malformed.

By the way make sure that you are inspecting all of the messages appearing in the apache error log -- some of them are not echoed to the web browser and they might be reporting errors in getting AliasMatch to work.

One reference on AliasMatch is at

http://httpd.apache.org/docs/mod/mod_alias.html#aliasmatch

another

http://www.apacheref.com/ref/mod_alias/AliasMatch.html

<| Post or View Comments |>