## WeBWorK Main Forum

### Solution to 'Connection Refused' When Embedding WeBWorK in HTML

by Zachery Sharon -
Number of replies: 1
I'm posting a solution to a problem I had so that if someone else runs into the problem they might find this solution here.

I was trying to embed WeBWorK problems into Blackboard using HTML by following the information in this blog post. I ran into a problem where a number of .css and .js files were failing to load because the localhost was refusing the connection. This occurred only when I called my university's local WeBWorK server and the embedding worked fine when I called the Rochester server, which points to the server configuration as the problem.

The reason for the problem was that, by default, the server has the following setting:

$server_root_url = https://localhost; which works fine when called internally by the WeBWorK server, but not when the server is being called from outside (for example, by an LMS or your local machine). Basically, instead of asking the WeBWorK server to supply the needed files, my code was asking the server that Blackboard was running on to supply files it didn't have. The setting needs to look like:$server_root_url = https://your.server.edu;

Changing that setting to an externally recognizable url solved the problem.