Forum archive 2000-2006

Eugene (Bud) Boman - Webwork homepage not found

Eugene (Bud) Boman - Webwork homepage not found

by Arnold Pizer -
Number of replies: 0
inactiveTopicWebwork homepage not found topic started 7/19/2005; 9:25:47 PM
last post 7/22/2005; 12:10:18 PM
userEugene (Bud) Boman - Webwork homepage not found  blueArrow
7/19/2005; 9:25:47 PM (reads: 1001, responses: 7)
Hi,

I'm installing WW 2.1 on a Debian system (woody). Just recently I successfully installed it on a the 'sarge' distribution so I'm not quite as clueless as I was. The difference here is that I'm reluctant to wipe the system out, repartition the disks and start with a clean install.

In particular this machine had Apache2 installed previously. I believe I removed it cleanly and installed Apache cleanly, but I'm not absolutely certain.

Anyway I walked through the installation procedure just like before and everything seemed to be going well until it came time to test the system by looking at http://cwcsrv11.cwc.psu.edu/webwork2

When I pointed my browser at the above I got this error message:

The requested URL /webwork2 was not found on this server.

I looked in /var/log/apache/error.log and sure enough one of the most recent errors was

[Tue Jul 19 20:58:22 2005] [error] [client 146.186.61.142] File does not exist: /var/www/webwork2

I'm pretty sure Apache is mis-configured but I can't tell if it is something left over from Apache2 getting in hte way or if I just messed up the webwork configuration somehow.

Any help/advise would be greatly appreciated,

-- Bud

<| Post or View Comments |>


userMichael Gage - Re: Webwork homepage not found  blueArrow
7/19/2005; 9:36:43 PM (reads: 1174, responses: 0)
I agree that it is a mis=configuration. For some reason it is not reading the stanza:

 

# Define the location that is handled by the Apache::WeBWorK module, and tell
# Perl where to find the libraries Apache::WeBWorK needs to run.
#
<Location $webwork_url>
SetHandler perl-script
PerlHandler Apache::WeBWorK
</Location>
in webwork.apache-config.

Does that file exist? is the item

 

# URL of WeBWorK handler.
$webwork_url = "/webwork2";
in global.conf set correctly? and is

$webwork_dir in webwork.apache-config set correctly?

Finally have you added the include statement to your apache config file?

 



# This file configures Apache to handle requests for WeBWorK. To install WeBWorK
# support in your Apache configuration, add the following line to the end of
# your Apache configuration file (usually apache.conf or httpd.conf):
#
# Include /path/to/webwork.apache-config
#
# Customize the variable $webwork_dir below to match the location of your
# WeBWorK installation.

These are the things I would check first. If necessary you can place warn or print statements in the first location stanza described above to see if it is being read.

-- Mike

<| Post or View Comments |>


userEugene (Bud) Boman - Re: Webwork homepage not found  blueArrow
7/20/2005; 6:22:44 AM (reads: 1166, responses: 0)
Thanks Mike.

All of these seem to be correct. In global conf I have:

# URL of WeBWorK handler.

$webwork_url = "/webwork2";

# Root directory of PG.

$pg_dir = "/opt/pg";

And in webwork.apache-config I have

# Set this variable to the path to your WeBWorK installation.

my $webwork_dir = "/opt/webwork2";

and

# Define the location that is handled by the Apache::WeBWorK module, and tell
# Perl where to find the libraries Apache::WeBWorK needs to run. #
<Location $webwork_url>
print "reading webwork_url location."
SetHandler perl-script
PerlHandler Apache::WeBWorK
Order allow,deny
Allow from all
</Location>

I have no idea what the correct syntax is for a warn or print statement in the apache config file so I put in the first line just now figuring if the stanza is being read I'd get an error message when I restart apache. Sure enough, after running

# apachectl graceful

I get the following in the error log:

[Wed Jul 20 05:59:27 2005] [notice] SIGUSR1 received. Doing graceful restart mod_perl: Invalid command 'print', perhaps mis-spelled or defined by a module not included in the server configuration [Wed Jul 20 05:59:27 2005] [notice] Apache/1.3.33 (Debian GNU/Linux) mod_perl/1.29 configured -- resuming normal operations [Wed Jul 20 05:59:27 2005] [notice] Accept mutex: sysvsem (Default: sysvsem)

I'm stumped. Any other ideas?

-- Bud

<| Post or View Comments |>


userMichael Gage - Re: Webwork homepage not found  blueArrow
7/20/2005; 9:17:21 AM (reads: 1161, responses: 0)
Somewhere in the configuration files (between httpd.conf, webwork.apache-config and others) the url http://this.server/webwork2 is being mapped to the directory /var/www/webwork2. It seems as if /var/www has somehow been set as a default directory and the Location stanza in webwork.apache-config is not being acted upon. This seems to happen if there is an error in the initiallization somewhere -- apache just ignores the bad code, and may or may not leave useful error messages.

I'd go back to the usual first principles of debugging. I suspect that the problem is in the $PerlConfig=<<EOF; ...... EOF section.

So one thing you can do is to comment out all of the $PerlConfig section and put in

 

<Location /webwork>
SetHandler perl-script
PerlHandler Apache::WeBWorK
Order allow,deny
Allow from all
</Location>

See if you can get that to work.

Another tack would be to get the Alias to work:

 

Alias /webwork2_files    /opt/webwork2/htdocs    

(or something like that)

Get one url to map to the correct directory. Then very slowly add in the other lines checking after each one. At some point things will start working, so you back up and try to figure out what isn't being defined or isn't being defined properly.

In general with debugging it is better to proceed from things that work -- trying to fix errors in something that doesn't work at all seems like it would be faster, but this is often not the case. Going from something that works to something very similar that doesn't work gives you a lot of information of where the error is. Going from something that doesn't work to something else that doesn't work gives you very little information.

Hope this helps.

Good luck. Let us know how it's going.

-- Mike

<| Post or View Comments |>


userSam Hathaway - Re: Webwork homepage not found  blueArrow
7/20/2005; 9:40:38 AM (reads: 1148, responses: 0)
Hi,

I'm not sure what's going on here, but Mike's suggestions are good. Also, you can use perl statements like "warn" anywhere within the <Perl> ... </Perl> section, as long as it's outside the $PerlConfig=<<EOF; ... EOF section. So you could try something like this right above the $PerlConfig=<<EOF; line:

 

warn "webwork_url='$webwork_url'\n";
warn "webwork_dir='$webwork_dir'\n";
warn "pg_dir='$pg_dir'\n";
warn "webwork_htdocs_url='$webwork_htdocs_url'\n";
warn "webwork_htdocs_dir='$webwork_htdocs_dir'\n";
warn "webwork_courses_url='$webwork_courses_url'\n";
warn "webwork_courses_dir='$webwork_courses_dir'\n";

Note if any of those values are missing or are set to something strange.

<| Post or View Comments |>


userEugene (Bud) Boman - Re: Webwork homepage not found  blueArrow
7/21/2005; 1:19:54 PM (reads: 1125, responses: 1)
Well, this is not going to be very satisfying or informative, but for tha sake of completing this thread and supplying such information as I have to the common knowledge base I'll post this final note.

WW2.1 seems to be working now, but I've no idea what was wrong or how it got fixed. I tried each of the suggestions offered by Mike and Sam and a few ideas of my own as well. Nothing worked. Finally, I decided that I'd edited the file 'webwork.apache-config' too many times to be sure that I hadn't introduced yet more problems so I deleted it and copied it again from 'webwork.apache-config.dist'.

I then put the lines

Order allow,deny
Allow from all

in the <Location $webwork_url> stanza, thinking that I'd be able to start again fresh from that point.

I then ran
# apachectl graceful

That fixed it. The homepage is visible and I just added the admin course. Like I said I don't know what was wrong but everything seems to be working fine now.

My best guess: While editing the file the first time I may have accidentally introduced an extraneous character somewhere in the file and never spotted it thereafter. However that is just a guess. It seems like Apache would have emitted an error in that case but I can't say for sure.

Mike, Sam, thanks for trying to help. Next time I'll try to have a problem that can be solved without magic (:-)

-- Bud

<| Post or View Comments |>


userMichael Gage - Re: Webwork homepage not found  blueArrow
7/21/2005; 3:07:56 PM (reads: 1306, responses: 0)
Some fixes require magic :-). Starting over from scratch is one of those magic tricks.

Whether or not the

 

Order allow,deny
Allow from all

lines are needed can depend on other configuration parameters higher up in the overall configuration file (httpd.conf).

Perhaps we should include those in the distribution file just to be safe.

Glad it's working now.

--Mike

<| Post or View Comments |>


userEugene (Bud) Boman - Re: Webwork homepage not found  blueArrow
7/22/2005; 12:10:18 PM (reads: 1162, responses: 0)
Just out of curiosity I tried deleting those lines and restarting Apache to see if that would break it again. It didn't. Still a mystery, but at least it is a working mystery.

-- Bud

<| Post or View Comments |>