0

I just started in the hosting world, and something that I haven't been able to fully understand is why web frameworks need to be hosted in web servers?

Recently I had a website runing over django, and thanks to some python scripts like dj-static and static I was able to serve the static files. So why is the need of using a web server?

After some days of coding, I wanted to enable https and I read that I needed to use a web server, but after some more research I found a post about someone who said being able of using https without a web server. So again, why are web servers necessary?

Is it a security reason?

Thanks!

1 Answers1

3

The builtin web servers of Django and co are very minimal pieces of software, they are optimized to make development/debugging easy but they don't care about performance, security or features.

As developing a secure and performant web server is quite difficult, it would be quite nonsensical for a web framework to invest any time into this while the problem is already solved by 3rd parties.

Sven
  • 97,248
  • 13
  • 177
  • 225
  • And putting them inside a web framework improves the performance? ( I guess that for the security and features its normal). So in a few words, if django security and features are okay for me there no real reason of using a web framework? –  Aug 12 '15 at 17:37
  • 1
    The security of e.g. the Django dev web server is *not* okay for any production use. It's a dev tool, nothing else. – Sven Aug 12 '15 at 17:38
  • When you say "It's a dev tool, nothing else." it confuses me, isn't okey to use for example nginx + django for a production server? –  Aug 12 '15 at 17:46
  • I mean just the builtin web server that Django offers for developing/testing. It's not a viable solution to run a django app in production, but nginx+uwsgi certainly are. – Sven Aug 12 '15 at 18:13