0

Our lab has semi-control over a few domain names, from our "official" one example-lab.org to a couple others that are subdomains of our university (example.school.edu). We are trying to get an SSL certificate to allow for encryption as we have an internal portion to the website which runs on Django and Apache.

Because our official domain name is actually owned by a third party, getting a certificate for it is proving difficult. However, we do have one for our school subdomain.

How can I set up Django/Apache to rewrite(is that the right term?) HTTP requests to our desired domain name, and HTTPS requests to the pragmatic name with the cert?

Nick T
  • 256
  • 2
  • 11

2 Answers2

1

I am skeptical this will work because I think you need to establish the https connection with the certificate of domain example-lab.org, which, it sounds like, would be a mismatched, or missing, certificate. Without a valid certificate, this would not be work.

In other words: If you come in on https://mysite.example-lab.org/ (site you don't have cert for), then you would have to serve the certificate before the redirect to https://mysite.school.edu happens. In short, a redirect from https requires a valid and established https connection to the site you are redirecting from, without certificates for both sites, this is not possible.

Dylan
  • 156
  • 4
0
Redirect / https://www.schooldomain.edu/

If you want more details pick your favorite search engine and search for 'apache redirect http to https'. There are literally thousands of examples out there. Most of them will be written to redirect http://www.example.com to https://www.example.com/, but your needs are the same. Just redirect to a different url.

  • I don't understand how that would redirect HTTP to one host name and HTTPS to another. – Nick T Nov 15 '13 at 22:06
  • Sorry, I misunderstood the last line. Assuming you have a separate virtual host for http and https, you put that line within each virtualhost directive and adjust accordingly. –  Nov 15 '13 at 22:09