WeBWorK Main Forum

mathjax only in library browser

mathjax only in library browser

by Jack Dockery -
Number of replies: 6

We just rolled out a 2.15 version of WW using the Virtual Machine Image. We are trying to import problem sets from an older version (2.7 I think) (years of work) and am having difficulties. MathJax only seems to work on the Library browser problems, not the homework sets. Images work just fine. 

This is the message I get from the counsel in Chrome:

 Mixed Content: The page at 'https://webwork2.math.montana.edu/webwork2/M171-Master/AA6/1/?effectiveUser=n94m256&key=J5Lr0685VPzgCN7MLkTRTk0I4G28wX96&user=n94m256' was loaded over HTTPS, but requested an insecure script 'http://153.90.146.27:8080/webwork2_files/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full'. This request has been blocked; the content must be served over HTTPS.


Could this be the issue? 

Also, what is the best way to import problem sets, etc from an old WW server to the new one? 

Cheers
In reply to Jack Dockery

Re: mathjax only in library browser

by Arnold Pizer -

Hi Jack,

MathJax is being served by lighttpd so you have to configure lighttpd to run under ssl. See https://webwork.maa.org/wiki/Installation_Manual_for_2.15_on_Ubuntu_20.04_Server#Configure_lighttpd_to_use_SSL

Images are served by lighttpd but images do not trigger an error message whereas using javascript does.

The other option is to set thing up so that MathJax is served by apache2 but this puts a heavier load on the server. If you have a light load or powerful server, this is an option.  You can look at the instructions for setting up lighttpd to server MathJax and undo them.

Arnie

In reply to Arnold Pizer

Re: mathjax only in library browser

by Jack Dockery -
Arnie, Our IT person went through the instructions you sent a link to, to configure lighttpd to use ssl and restarted everything, this made it kinda worse. MathJax did display something besides [math], the LaTeX code and images displayed very poor renditions of the images so we rolled it back.

What I do not understand is how or why MathJax works fine in the Library Browser but not the homework or homework editor on the exact same
set of problems.
In reply to Jack Dockery

Re: mathjax only in library browser

by Glenn Rice -

The reason that it works in the library browser and not the rest, is that the library browser (incorrectly) has a hard coded path to mathjax ($webwork_htdocs_url/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML).  So it uses $webwork_htdocs_url instead of the setting that you have probably changed in localOverrides.conf to something like https://your.domain.edu:8080/webwork2_files/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full.  You (most likely) still have $webwork_htdocs_url set to the default location in site.conf.  That means the library browser is still serving mathjax through apache2, while the others are being served through lighttpd.

In reply to Jack Dockery

Re: mathjax only in library browser

by Arnold Pizer -
Hi Jack,

I added a section about "Trouble with SSL certificates" which may not be exactly your problem but the solution should fix your problem. As it says it is a quick and dirty fix but I would try it. Look at:  https://webwork.maa.org/wiki/Installing_from_WW2.15_Ubuntu20.04_Server_Virtual_Machine_Image#Trouble_with_SSL_certificates

The Library Browser operates differently (through different calls) than displaying problems. Sometimes this causes trouble but in this your case it works better. Note that disabling lighttpd will put an additional strain on your server but unless you have large numbers of students and a relatively weak server, you probably won't notice it.

Arnie
In reply to Arnold Pizer

Re: mathjax only in library browser

by Jack Dockery -

Well, the IT people figured out something to get it to work:

"Jack, I think I fixed the Mathjax problem! It was to do with the SSL configuration for Lighttpd. I think the certificate I created yesterday wasn’t formed correctly. When I tried doing it a different way it sort of worked, I just then had to make a change in a config file and it all appears to be working now – from what I can see at least. Please check things out and let me know.

"

I will try to post what was done to fix this next week, sorry for the trouble. Cheers

In reply to Jack Dockery

Re: mathjax only in library browser

by Arnold Pizer -
Thanks Jack,

Having some information on setting up official SSL certificates, especially the certificate chain, would be very useful.

Arnie