Warning messages
Non-fatal warning: file /opt/webwork/courses/m126_jensen/course.conf contains at least one character code which is not valid in UTF-8. (The copyright sign is often a culprit -- use '©' instead.)
While this is not fatal you should fix it
I am working on a new WW server and have gotten so far along but seem to have hit this same road block. I followed the instructions here and have the legacy version of MathJax running. I am getting a different error though, a mixed content error...
Blocked loading mixed active content “http://156.110.194.114:8080/webwork2_files/mathjax/MathJax.js?config=TeX-MML-AM_HTMLorMML-full”
Chrome and Safari won't load any equations but Firefox will let you load images but not MathJax.
I cannot seem to find anybody else having my mixed content issues...
TIA
https://webwork.maa.org/wiki/Installing_from_WW2.15_Ubuntu20.04_Server_Virtual_Machine_Image#Trouble_with_SSL_certificates
Fail at using the forums!
Mixed Content: The page at 'https://webwork2.math.school.edu/webwork2/f21-Math_2-section_03/instructor/setmaker/' was loaded over HTTPS, but requested an insecure stylesheet 'http://192.168.104.40/webwork2_files/js/vendor/bootstrap/css/bootstrap-responsive.css'. This request has been blocked; the content must be served over HTTPS.
I requested a valid certificate but even when it gets issued, it's using the ip address of the webserver and not web url
In site.conf, the $server_root_url is the ip address now, if I change it to the dns name then I get :
183 setmaker.js: /webwork2/instructorXMLHandler: Forbidden
thoughts?
-tom
Now I'm back to the mixed content error:
Mixed Content: The page at 'https://webwork2.math.school.edu/webwork2/f21-Math_2-section_03/instructor/setmaker/' was loaded over HTTPS, but requested an insecure stylesheet 'http://webwork2.math.school.edu/webwork2_files/js/vendor/bootstrap/css/bootstrap.css'. This request has been blocked; the content must be served over HTTPS.
I don't see any errors in the webwork apache logs, what is blocking the request?
Mixed content errors are usually on the client side. The web server has no issue with serving some pages over https and others over http. In fact, apache isn't even aware that the css file being requested is associated with a particular webpage, so it's most likely the browser that is blocking the request.
Do you have $server_root_url as https? The URLs to auxiliary files in WeBWorK are created based on that variable, so if that does not have https, then you will see URLs like the one you see for bootstrap.css (i.e. with http:// rather than https://). This should lead to all URLs starting with https, and browsers being happy.
In general, you should grep through the .conf files, especially localOverrides.conf, and search for any occurrences of "http" and change to https if necessary.
My reverse proxy is adding the extra complication. When I configure the $server_root_url in site.conf to be the fqdn over https everything works except when I go to Instructor Tools -> Library Browser. The Subject pull down works but then the Chapter pull down gives the "183 setmaker.js: /webwork2/instructorXMLHandler: Forbidden" error.
this is the proxy logs:
158.121.104.40 - - [26/Oct/2021:09:40:34 -0400] "POST /mod_xmlrpc HTTP/1.1" 404 153 "-" "SOAP::Lite/Perl/1.27"
158.121.33.14 - - [26/Oct/2021:09:40:34 -0400] "POST /webwork2/instructorXMLHandler HTTP/1.1" 403 1826 "https://webwork2.math.umb.edu/webwork2/f21-Math_242-section_03/instructor/setmaker/?effectiveUser=tom.mullaly" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 Edg/95.0.1020.30"
and then on the webwork server logs:
158.121.106.227 - - [26/Oct/2021:09:40:34 -0400] "POST /webwork2/instructorXMLHandler HTTP/1.1" 403 5208 "https://webwork2.math.umb.edu" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 Edg/95.0.1020.30"
158.121.104.40 is the webwork server
158.121.33.14 is my client browser
158.121.106.227 is the proxy server
thoughts?
-tom
This is a common and tricky problem. It's a long shot but you could try
$server_root_url = 'https://localhost'
See e.g.
about:srcdoc:9
GET http://localhost/webwork2_files/js/vendor/bootstrap/css/bootstrap.css net::ERR_EMPTY_RESPONSE
One thing that seems odd is that on the proxy server the log lists the full path as the referrer, whereas the webwork server just lists the root url of the server (assuming that these are both using the default apache log format). This may be a setting on the proxy server, and I don't know if it affects the behaviour.
Do you see anything in either the browser error console or the apache error log when you get the "forbidden" error?
Looking at old forum posts, it looks like there are sometimes issues with having $server_root_url in double quotes rather than single quotes, so that's something else to check.
Was the Library Browser working properly before you set up the proxy?
I'm getting the same 183 setmaker.js: /webwork2/instructorXMLHandler: Forbidden error
On the webwork server here is the access and error.log:
==> /var/log/apache2/access.log <==
158.121.106.227 - - [27/Oct/2021:09:11:10 -0400] "GET /webwork2/f21-Math_242-section_03/instructor/setmaker/?effectiveUser=tom.mullaly HTTP/1.1" 200 5427 "https://webwork2.math.umb.edu" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 Edg/95.0.1020.30"
158.121.106.227 - - [27/Oct/2021:09:11:10 -0400] "GET /webwork2_files/node_modules/iframe-resizer/js/iframeResizer.map HTTP/1.1" 200 19375 "https://webwork2.math.umb.edu" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 Edg/95.0.1020.30"
==> /var/log/apache2/error.log <==
There were a lot of errors
Errors:
404 Not Found at /opt/webwork/webwork2/lib/WebworkClient.pm line 301.
End Errors
xmlrpcCall to searchLib returned no result for
[Wed Oct 27 09:11:13.426988 2021] [perl:error] [pid 182962] [client 158.121.106.227:53886] [5cb15bc7-d42b-5be7-bb5c-ee249e546918::5c597db1-3727-11ec-ab69-d5d9f98114fc] [/webwork2/instructorXMLHandler] {"Time":"Wed Oct 27 09:11:13 2021","Error record identifier":"5cb15bc7-d42b-5be7-bb5c-ee249e546918::5c597db1-3727-11ec-ab69-d5d9f98114fc","Warnings":[],"HTTP Headers":{"Accept":"*/*","Accept-Language":"en-US,en;q=0.9","sec-ch-ua":"Microsoft Edge;v=95, Chromium;v=95, ;Not A Brand;v=99","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 Edg/95.0.1020.30","Cookie":"WeBWorKCourseAuthen.f21-Math_242-section_03=tom.mullaly%09wsiJL85VdlybXC0iurvmPgG6ZMAmPdyY%091635340270","Host":"webwork2.math.umb.edu","sec-ch-ua-platform":"\\"Windows\\"","Origin":"https://webwork2.math.umb.edu","Sec-Fetch-Dest":"empty","X-Real-IP":"158.121.33.14","Referer":"https://webwork2.math.umb.edu","Sec-Fetch-Site":"same-origin","Sec-Fetch-Mode":"cors","Accept-Encoding":"gzip, deflate, br","sec-ch-ua-mobile":"?0","Connection":"close","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","Content-Length":"240","X-Requested-With":"XMLHttpRequest"},"Method":"POST","URI":"/webwork2/instructorXMLHandler"} xmlrpcCall to searchLib returned no result for \n * in WeBWorK::ContentGenerator::instructorXMLHandler::content called at line 232 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm\n * in WeBWorK::ContentGenerator::go called at line 386 of /opt/webwork/webwork2/lib/WeBWorK.pm, referer: https://webwork2.math.umb.edu
==> /var/log/apache2/access.log <==
158.121.106.227 - - [27/Oct/2021:09:11:13 -0400] "POST /webwork2/instructorXMLHandler HTTP/1.1" 403 5002 "https://webwork2.math.umb.edu" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 Edg/95.0.1020.30"
I added the real certificate to both the proxy and the webwork server.
webwork2.math.umb.edu is a cname that points to the proxy so I added a local webwork2.math.umb.edu on the webwork server in /etc/hosts so it can call itself without going through the proxy, using the routable address (not localhost, although that might work.)
I changed $server_root_url in site.conf to be https://webwork2.math.umb.edu
Voila