Installation

two webwork sites on one server

two webwork sites on one server

by George Jennings -
Number of replies: 3
A colleague from a different campus has requested that we host his college's webwork site on our webwork server. This is OK with us and our IT people but I'd like to do it in a way that would keep their site separate from ours, with separate course directories etc. so they can administer their courses and we can administer ours on the same server without any potential conflicts.

It seems that one approach would be to create different "courses" and "webwork2" directories on our server for their courses and configuration files (with different names of course), and then just copy everything from our webwork2 directory into theirs, make appropriate changes to their configuration files, add their site to the webserver's configuration, and restart the server.

Is there a better way to do this? For example, instead of having two copies of everything in webwork2, would it work if we just make separate copies of the configuration files and all the files and directories that are writeable by the server? (Hmm but a partial setup like that probably would be harder to maintain...)

George


In reply to George Jennings

Re: two webwork sites on one server

by Danny Glin -
I set up something like this once in the distant past.  It's doable, but not exactly trivial.

There is a file in the conf directory called devel.apache2-config.dist, which discusses multiple instances of WeBWorK on one server, but it hasn't been touched in 6 years, so I don't know that I would trust it.  Here is what I know:

WeBWorK compiles all of the perl code into each apache process.  This means that a given apache instance can only serve one specific version of WeBWorK.  In order to run two separate WeBWorK sites, you would have to start two separate instances of apache, listening either on different ports or different IP addresses.

Regarding sharing core WeBWorK files between the two instances, this should also be possible.  There should be no problem using the same pg and libraries directories for both, as (AFAIK) the system doesn't write to either of these (assuming you set up the OPL to be read-only from within courses).  The webwork2 directory is a little more complicated, as only some subdirectories are writable.  I handled this using symlinks for the areas that were common between the two sites.

I believe that if you get the settings in the previous section just right, then the whole thing should be maintainable.  Of course the only real way to know would be to try it.

If you want to go further down this road, I can provide some more details, though some of it may be system specific, as it involves making changes to the apache configuration.

Danny
In reply to Danny Glin

Re: two webwork sites on one server

by George Jennings -
Thanks, Danny, this does sound trickier than I had imagined. It'll probably be a lot easier if we just host their courses on our site, and live with having a longer list of courses.

George
In reply to George Jennings

Re: two webwork sites on one server

by Michael Gage -
You can separate the list of courses for the two schools if you want:

There is no reason you need to use webwork2 itself as the front page. 

You can have two standard html pages 

https://ucschool.edu/school1
https://ucshool.edu/school 2

Each of these would have standard html links for the courses at the separate school of the form:

<a href="https://ucschool.edu/webwork2/school1course1">  Course1 </a>

Each of the two front pages would point only to courses for that school.
The link above would be on the school1 page.

You have to maintain two additional html pages but that is less trouble than trying to run two versions of apache.  :-)