Apache with mod_wsgi with Django to develope
I have installed Django, Apache2 and even mod_wsgi. With a project, I have Django serving it. When i press the "http://localhost:8000" (which is django server) I have made sure that my websites main page or home page is shown.
The doubt i carry is, when i can do all this localhost:8000 and get the webpage, where does apache 开发者_JS百科and mod_wsgi come into picture? I mean, why should i consider my files to be served by Apache2 when i have Django server? I just searched and came across facts that we have these facilities of apache+mod_wsgi to help us serve the site. But again, i m in confusion as in where is it used to serve my files when i have my website running on Django server?
Please if anyone can make me understand !!
Thank you
Short answer: The Django development server is a piece of poo.
Longer answer: The Django development server is a single-threaded, single-processed server that is little more than a threadbare WSGI server on a skeleton of hopes and wishes.
I used FastCGI.
As I have installed the Django site with FastCGI. I come to conclusion that, Apache has to serve the files, as Django is the development server and by itself can't serve the files online. It requires well known web server like Apache to serve the pages and do the things.
As when the request is sent to the server, the installed apache is used to serve the files and not Django as it has the ability to get the request and then use the files of the project to show online
精彩评论