Thanks for your help. I figured it out and it was something else. In site.conf I had changed the line
$webwork_url = '/webwork2'
$webwork_url = ""
And then forgot that I had changed it. I started installation pretty much from scratch and left it like that and everything worked fine. Oops.
Thanks for helping, though.