0

I am running a Python http server (Waitress) behind an Apache 2.4 web server. I have a rewrite rule to make Apache actually access an internal port (55555) in my system (the port that Waitress serves). This works well. Waitress cannot serve HTTPS.

But now I need two more things: force users to always use HTTPS and authenticate users with Apache's own AuthType Basic. Is it possible to have all these three things together? This "double redirection"!

Should happen in this order:

  1. Redirect all http calls to equivalent https address.
  2. Force authentication
  3. Rewrite/redirect to Waitress port
Mikko Koivunalho
  • 331
  • 2
  • 14
  • You didn't provide any input on the answer I provided. Gently reminding you to give some feedback / vote / accept if that helped :-) – Capsule Jun 13 '17 at 11:15

1 Answers1

1
  1. How to redirect all HTTP requests to HTTPS
  2. If your http server requests auth, it should be the case when rewritten too, but it will need to be handle on the Waitress side
  3. You already do that. To be more precise, you will need to add the rewrite rules from point 1 before your existing ones.
Community
  • 1
  • 1
Capsule
  • 6,118
  • 1
  • 20
  • 27