Installation

Redirect access from IP address to FQDN?

Redirect access from IP address to FQDN?

by Max Bronsema -
Number of replies: 2

Hi,

Recently it was discovered that users on our instance of WebWork can access the insecure (HTTP) login page of a course via the server IP address, luckily this only works when local to the network, but our information security team would still like it cleaned up.

Looking in sites.conf I can see we have the domain set to use https and that indeed works well. What I can't find in the documentation is how to redirect access requests from an address like http://145.162.214.102/webwork2/2021_Winter_Math_Instructor/ to rewrite as the normal HTTPS URL.

This is probably some sort of base level apache thing that I am unaware of but would appreciate a hint.

How do I force WebWork to take an IP address request and redirect to the https version of the FQDN? Thank you.

In reply to Max Bronsema

Re: Redirect access from IP address to FQDN?

by Arnold Pizer -
In reply to Arnold Pizer

Re: Redirect access from IP address to FQDN?

by Max Bronsema -

Thanks Arnold.

It turns out we already had those rewrites in place, but we added one for the IP address of the server to rewrite to the base URL and it works great.

Have a great holiday!