4 ms·
Gunicorn does support https. They still seem to recommend using a different server in front of it.
by foxfluff 5y ago
Gunicorn does support https. They still seem to recommend using a different server in front of it.
- samwillis 5y agoI think it depends on how your whole stack looks. If you are running on a PAAS such as Heroku, have load balancers or are even using something like ClourFlare I don’t this it’s necessary to have something in front of Gunicorn. I wouldn’t leave Gunicorn “naked” for want of a better word, or use it for static files though.
- TekMol 5y agoIf you put Apache or Nginx in front of it, why not leave out Gunicorn completely?
- deniska 5y agoApache has mod_wsgi, nginx not so much. mod_wsgi is a much less flexible setup when it comes to mixing and matching different python versions
- samwillis 5y agoPython has an interface called WSGI (web server gateway interface), with both Apache and Nginx you need either a none standard module for that interface or to reverse proxy to a second server that does. So same number of moving parts either way.
- loloquwowndueo 5y agoGunicorn is not just a static content server (actually I don’t think it can serve static content out of the box?) but a wsgi-compliant application server. You can’t leave it out because then, how would your python web backend run?
- TekMol 5y agoFor apache, there is libapache2-mod-wsgi-py3 Seems easier to just "apt install libapache2-mod-wsgi-py3" and put a "WSGIScriptAlias" directive into your apache config than to run another piece of software?
- ochoseis 5y agoHere’s why according to their docs: > Although there are many HTTP proxies available, we strongly advise that you use Nginx. If you choose another proxy server you need to make sure that it buffers slow clients when you use default Gunicorn workers. Without this buffering Gunicorn will be easily susceptible to denial-of-service attacks. https://docs.gunicorn.org/en/stable/deploy.html https://docs.gunicorn.org/en/stable/deploy.html