Saturday, September 8, 2012

Understanding the use of Apache and nginix with Django

Hello,

I've just started working on deploying a Django hosted website on my VPS. Last night I finished configuring mod_wsgi with apache2.2 and had got the 'It works!' page running from my Django project. I read here (https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/) the following: 
Django doesn't serve files itself; it leaves that job to whichever Web server you choose.
We recommend using a separate Web server -- i.e., one that's not also running Django -- for serving media. Here are some good choices:
I don't really understand this. This morning I configured my urls.py and views.py to direct the '/' site url to an index.html template I created on the fly (just for sanity check). Although it wasn't working at first, I restarted apache2.2 service and the web page shows fine now. I don't understand the idea of hosting two web servers and how Django is involved with this if at all. 

To me, it seems like apache routes clients to the wsgi, and the wsgi returns with whatever http response it conjures up? Can someone shed some light on this?

Thanks,
RC

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/9KrPNlJvEbwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate