I have a setup where NetBSD's native bozohttpd serves certain static contents. It uses https and basic auth and the setup is pretty stable.
There are some small pieces of requirements to add some python web apps developed using Flask. The app needs to use the same authentication data used by the basic setup above. Fortunately that turns out to be easy. Now I have two options: Option 1: Run a separate instance of a python based web server such as gunicorn on a separate port for the apps and use bozohttpd for static contents. I have to start gunicorn as root so that it can get access to certificate files, but run the worker process as a non root user which is an option provided by gunicorn. One problem with this is, I don't get the environment variables right this way. There are ways to feed those into gunicorn, but that would amount to replicating my rc scripts that elaborately define the environment. Option 2: Run python web server on localhost and via bozohttpd cgi route the requests/responses to/from it. There may be slight overhead of this, but it's not a performance critical application. I can also use a simple http and Flask's simple builtin server internally as it is not exposed to the internet. Would appreciate any comments / pros and cons etc. Mayuresh
