wsgi - how to call between apache and django
某草草
某草草 2017-05-16 17:03:03
0
2
513

I read some introductions to wsgi on the Internet, but they basically talked about what wsgi is, but did not say how wsgi works specifically.

Simply put, I want to know how on a web server built with django+apache, when apache receives a request from a client, it passes the request to the django code.

Is the django code running in the apache process, or does it have its own process and communicate in some way?

If it runs in the apache process, then every time a new apache process is created, the django code will be reloaded?

某草草
某草草

reply all(2)
左手右手慢动作

In fact, it is an intermediate communication protocol. As mentioned above, you can also use http. WSGI seems to have better performance. I can’t remember whether wsgi is the best at the moment. What I use here is uwsgi.Java. There is a similar communication protocol between HTTPServer and application container. A basic advantage of the two isolations is that static files can be provided directly using the httpServer service.
httpServer and the container are completely independent processes. To be precise, there can be more than two. You can open as many uwsgi as you like. They are completely configurable. For example, 4-6 uwsgi service processes can be opened at the same time to provide container services.

阿神

Apache将请求直接转发给Django,和直接访问DjangoNo difference

Official Documents

https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/modwsgi/

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!