Whats the best way to host my Python website on a VPS using Docker? is a Reverse Proxy useful? reddit / selfhosted ---------------------------------------------------------------------- aldi-trash-panda · 2023-11-23 17:00 I can get my Django app on the Python image and get that set up on my VPS, but I am wondering if I should use a Reverse Proxy to harden my security? or will running my app on port 80 take care of all my needs? I am open to suggestions. Python is just where I started and I am more comfortable. ---------------------------------------------------------------------- sk1nT7 · 2023-11-23 18:00 If you really question whether a reverse proxy is useful when exposing a web application to the Internet, maybe you should not directly start with exposing your self-build Django web app. Nonetheless: YES, a reverse proxy would be a viable choice in exposing your app. It streamlines the way you expose your HTTP services and typically provides things such as SSL certificate management so that your web app is accessible securely via HTTPS. However, the real security often lies in the proxied application. So if your code is insecure, it likely won't matter whether you have a reverse proxy, SSL/TLS or not. Attackers will target your application code and not matter about the infrastructure setup. In general, try to harden the whole application stack. OS, backend server, reverse proxies and so on. Set HTTP security headers and audit the overall configuration and of course your application code itself. ---------------------------------------------------------------------- Symnet · 2023-11-23 23:31 don't expose python's wsgi server for production. this means that you need to at the minimum have apache or nginx (preferable imo) set up as a reverse proxy. also, i'd recommend setting up letsencrypt for tls since there's really no reason to use unsecure http anymore.