WeBWorK Main Forum

When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

by Christian Seberino -
Number of replies: 7
I'm trying to follow the install docs and create a virgin Webwork server install
from the latest 2.7 Webwork source from git.

I think I got all the way through successfully but when I try to now restart
Apache I get this in my Apache error log..


[Tue Sep 10 00:51:27 2013] [error] [client 74.194.237.26] File does not exist: /var/www/webwork2
[Tue Sep 10 00:51:27 2013] [error] [client 74.194.237.26] File does not exist: /var/www/favicon.ico
[Tue Sep 10 00:51:31 2013] [error] [client 74.194.237.26] File does not exist: /var/www/webwork

...etc.

I've checked many times that my webwork.apache2-config is exactly
like webwork.apache2-config.dist by comparing hashes. 

...

I  have set $server_root_url in site.conf to the full URL ..
http://x.x.x.x.compute-1.amazonaws.com .

(If I leave $server_root_url equal to an empty string I get the following other error instead...

Syntax error on line 45 of /opt/webwork/webwork2/conf/webwork.apache2-config:
unable to determine apache server url using course environment |WeBWorK::CourseEnvironment=HASH(0x7fc037e44b28)|.check that the variable $server_root_url has been properly set in conf/site.conf\nCompilation failed in require at (eval 1324) line 2.\n\t...propagated at /usr/share/perl/5.14/base.pm line 93.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor3.pm line 20.\nCompilation failed in require at (eval 1323) line 2.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK.pm line 85.\nCompilation failed in require at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\nBEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 35.\n


So it seems I can toggle the error message by the value of $server_root_url 
but *neither* value works.

Why is this happening?

Sincerely,

Chris  
In reply to Christian Seberino

Re: When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

by Arnold Pizer -
Hi Chris,

Not sure what directions you are following, but for one of your inconsequential errors (File does not exist: /var/www/favicon.ico)  


Finally we copy WeBWorK's icon file favicon.ico to Apache's www directory.

$ sudo cp /opt/webwork/webwork2/htdocs/favicon.ico /var/www
Password: <wwadmin password>

Now restart Apache


Arnie

In reply to Christian Seberino

Re: When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

by Arnold Pizer -
Hi Chris,

Not sure what directions you are following, but for one of your inconsequential errors (File does not exist: /var/www/favicon.ico)  


Finally we copy WeBWorK's icon file favicon.ico to Apache's www directory.

$ sudo cp /opt/webwork/webwork2/htdocs/favicon.ico /var/www
Password: <wwadmin password>

Now restart Apache


Arnie

In reply to Christian Seberino

Re: When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

by Arnold Pizer -
Hi Chris,

Not sure what directions you are following, but for one of your inconsequential errors (File does not exist: /var/www/favicon.ico)  


Finally we copy WeBWorK's icon file favicon.ico to Apache's www directory.

$ sudo cp /opt/webwork/webwork2/htdocs/favicon.ico /var/www
Password: <wwadmin password>

Now restart Apache


Arnie

In reply to Arnold Pizer

Re: When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

by Christian Seberino -
When I did an Internet search for "Webwork installation documentation", Google had ver2.4 and ver2.5 docs at the top so I erroneously assumed the later Webwork versions didn't have their own install docs.

I just tried a fresh ver2.7 install from scratch on a new Amazon EC2 Ubuntu 12.04 virtual machine using the correct ver2.7 docs mentioned above and still got this now...

"File does not exist: /var/www/webwork2"

1. I've tried creating a blank /var/www/webwork2 file.
2. I've tried commenting out DocumentRoot in 
         /etc/apache2/sites-available/default.
3. I've tried changing DocumentRoot in 
         /etc/apache2/sites-available/default to something else.

Nothing works.
In reply to Christian Seberino

Re: When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

by Arnold Pizer -
Hi Chris,

Maybe Amazon automatically sets the "server root" to apache2's document root.

First to make sure you haven't done something wrong,
cd to /opt/webwork/webwork2/conf
and run
 grep -R "/var/www/webwork" *
just to make sure you haven't set this somewhere. Assuming this doesn't find anything, here is a hack that might work.

In /var/www run
ln -s /opt/webwork/ webwork
which will give a link to the correct location.  If this gets you a bit further you will probably also need
ln -s /opt/pg/ pg

I really don't know what is going on so this is just a shot in the dark.

If you want something that works to compare things with, you can get vmware player or virtualbox for free (to run on a personal machine) and then 

Good luck,

Arnie



In reply to Christian Seberino

Re: When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

by Jason Aubrey -
Hi Chris,

When I logged in to your server, I found three problems with the installation:

(1) the permissions were generally wrong on directories and files in the /opt/webwork tree
(2) the version of apache installed was the worker mpm - we need the prefork mpm.
(3) the apreq module was not enabled

I fixed those problems and things seem to work now. (At least, the front page shows no warnings or errors, but you'll need to log in and play around to really see how things are running.)

Hope this helps,
Jason

In reply to Jason Aubrey

Re: When trying to start Apache2 with fresh install of ver2.7..."File does not exist: /var/www/webwork2" and "File does not exist: /var/www/webwork".

by Christian Seberino -
Wow thanks.  I skipped the section in the install docs regarding installing Ubuntu since Amazon EC2 did that for me.  That will make folks forget the apache2-mpm-prefork package among other things.  

Regarding perms....it seemed easier to give Apache and Webwork access to everything with "chmod -R 770 /opt/webwork ; chown -R www-data.wwadmin /opt/webwork".   It was easy and a blunt solution but perhaps that has issues.  

Thanks again.

cs