Installation

Installing WeBWorK 2.15 on Ubuntu 20.04 -- Option B, lighttpd Configuration

Installing WeBWorK 2.15 on Ubuntu 20.04 -- Option B, lighttpd Configuration

by Keir Lockridge -
Number of replies: 6

I have more-or-less completed an install of WeBWorK on a server running Ubuntu 20.04 by following these directions:

https://webwork.maa.org/wiki/Installation_Manual_for_2.15_on_Ubuntu_20.04_Desktop

I was able to do the "Option A" section of the install, and I had already set up https on the server, so WW runs over https. But I cannot successfully get through the Option B installation instructions here:

https://webwork.maa.org/wiki/Installation_Manual_for_2.15_on_Ubuntu_20.04_Desktop#Implement_Optional_B_.28lighttpd.29

In the instructions, the default is to use 'localhost' for the items that will be served by lighttpd, but when I use 'localhost' it fails entirely (my web browsers cannot resolve the relevant http addresses). After changing 'localhost' to my actual server name, images are served correctly by lighttpd, but MathJax will not render. Here is the relevant addition to the localOverrides.conf file:

# Location of MathJax script, used for the MathJax display mode.
$webworkURLs{MathJax} = 'http://myrealservername.edu:8080/webwork2_files/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full';
This fails in Chrome, Safari, and Firefox. Chrome tells me the problem is that I'm trying to run an insecure script via http on a page that is otherwise served via https. Now, if I instead do this:

$webworkURLs{MathJax} = 'https://myrealservername.edu/webwork2_files/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full';

then it works fine, but this seems to (partially) defeat the purpose of doing Option B at all.

(1) Is my fix reasonable, or is it indeed pointless since then lighttpd won't be serving the MathJax?

(2) Is there another way to fix the problem so that I can indeed serve MathJax via http:// and lighttpd as the install directions suggest?

I want to avoid figuring out how to serve the lighttpd pages over https as well ... I feel like what *should* work is I should be able to do the original 'localhost' option, but I can't figure out why that's failing.

Has anyone else run into this issue?
In reply to Keir Lockridge

Re: Installing WeBWorK 2.15 on Ubuntu 20.04 -- Option B, lighttpd Configuration

by Arnold Pizer -
Hi Keir,

Have you tried looking at https://webwork.maa.org/wiki/Installation_Manual_for_2.15_on_Ubuntu_20.04_Server#Configure_lighttpd_to_use_SSL

I didn't test these recently because in my setup I did not get an error running lighttpd under http.

Arnie
In reply to Arnold Pizer

Re: Installing WeBWorK 2.15 on Ubuntu 20.04 -- Option B, lighttpd Configuration

by Keir Lockridge -
I wasn't able to make it work, but I admit I lost steam when looking through the linked documentation. I tried to follow the directions but I gave up.

Instead, I decided to do this. Maybe you can tell me if it is a bad idea. I used apache's proxypass to forward requests made to light.myservername.edu to myservername.edu:8765 (where lighttpd was listening). After setting this up, it was very easy to use certbot to get ssl running at that address (light.myservername.edu). In configuring WW, I used https://light.myservername.edu instead of http://myservername.edu:8765. This works fine.

But! I don't *really* know what I'm doing, so my worry is that by having apache pass the request off to lighttpd I'm actually making things worse by sort of using BOTH webservers. Any thoughts about that? Or is using proxypass with apache a legit way to pass traffic off to lighttpd? If it is, then I'm good.
In reply to Keir Lockridge

Re: Installing WeBWorK 2.15 on Ubuntu 20.04 -- Option B, lighttpd Configuration

by Arnold Pizer -

Hi,

I'm not knowledgable enought to answer your main question (if "by having apache pass the request off to lighttpd I'm actually making things worse"?).

I just tested the directions (and modified them a bit) and they work fine but your problem in following them might beĀ 

"If you are using official certificates, you will also have to edit the Certificate Chain, Certificate Authority and possibly other items. Instructions for doing so are beyond the scope of this document. See e.g. http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_SSL"

and here again this is beyond my level of expertise.

If you figure out an easy way to handle this, please let me know or add a comment to the wiki.


Thanks,

Arnie

In reply to Arnold Pizer

Re: Installing WeBWorK 2.15 on Ubuntu 20.04 -- Option B, lighttpd Configuration

by Keir Lockridge -
Yes, that's exactly the part I had trouble with.

If having apache pass off to lighttpd is legit, then my solution was a very easy one. If I ever figure out whether this is so, I'll let you know and give you more details. Thanks for your input!

--Keir
In reply to Keir Lockridge

Re: Installing WeBWorK 2.15 on Ubuntu 20.04 -- Option B, lighttpd Configuration

by Arnold Pizer -
Hi,

Do these instructions help?
https://www.vultr.com/docs/setup-let-s-encrypt-with-lighttpd-on-ubuntu-16-04

Arnie
In reply to Arnold Pizer

Re: Installing WeBWorK 2.15 on Ubuntu 20.04 -- Option B, lighttpd Configuration

by Keir Lockridge -
I'll check it out if my current fix turns out the be invalid; right now, it seems to be working pretty well. I just need 100 robot students to test the server, I guess.

--Keir