質問: ApacheやNginxはDjangoアプリケーションを提供していますか? 私はDjango Webアプリケーションを配備したいので、Pythonファイルを提供するためにWebサーバーを選択する必要があります。 私の生産サイトは、データベースとWebサーバーをホストする単一のサーバー上にあることに言及する必要があります。勢いが増すにつれて、データベースを専用サーバーなどに移動することを目指します。 ここに私の質問があります: 1. Should I use one web server or two? The context of this question is that lots of people recommend using NginX to serve static media files and Apache to serve the Python, which beckons the following questions: 1. Why can't we use just one server. I understand Apache may be a beast at times, therefore I would suspect people to use NginX to serve BOTH static media files and python files. 2. If using one server, what is better, Apache or NginX. I am experienced in Apache, but I have heard only good things about NginX. 2. What are the advantages to using FastCGI as opposed to mod_wsgi? 事前に多くの感謝
回答: I have used gunicorn + eventlet as the Python server, and nginx as the reverse proxy with great success. Recently I switched to uWSGI and it seems to be just as good of a solution if not better. I have yet to try apache and Django although I was an apache user prior to using Django. Here is a good write up on getting it all done: