0

I have several tiny python webservers on a single server that I spin up, each with a different port. Is there an easy and quick way to password protect the access to each single (e.g. webserver1) webserver with usr:pwd challenge?

These micro python webservers are each coded from different 3rd parties, and integrating a password protection into the python code of each of them is currently not possible.


So I was thinking maybe a password protection with a reverse proxy? Is this possible?

python webserver1: 10.0.0.1:8080
python webserver2: 10.0.0.1:8090
python webserver3: 10.0.0.1:9080
python webserver4: 10.0.0.1:9090
...
user3200534
  • 392
  • 1
  • 3
  • 10
  • 1
    It is actually fairly common to off load the authentication to the reverse proxy (rather than having to build in authentication into different applications) – Bob Nov 28 '20 at 21:26
  • @HermanB ok... Which reverse proxy would be easy and quick to setup? It's alright to have just 1 authentication for all micro python servers. Unfortunatelly I can't run docker on that server. – user3200534 Nov 28 '20 at 21:39
  • Whatever you want: nginx, apache, etc. – Michael Hampton Nov 29 '20 at 01:32
  • You could create a location for every application, use proxy_pass to send the connection and: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ To protect your locations Assuming you are going to use nginx – Leandro Ferreira May 31 '21 at 16:06

0 Answers0