Apache+mod_wsgi is one solution (the docs also mention several others).
Their main point is that you shouldn't serve static content via Django.
Ideally, you'd serve static content from another server entirely or via
a CDN. If you are serving files + app on the same server, I think it's
fine to use nginx for both since unlike the Apache+mod_wsgi setup, nginx
isn't actually running the Django app, but simply acting as a proxy.

_Nik

On 10/30/2012 6:04 PM, Chris Pagnutti wrote:
> Hi all.  Thanks to everyone for their comments.  If Debian is
> available, I think I like that idea for the OS.
>
> As for server security, I think I had the basics, but there are some
> great points in your replies.  
>
> @Nik:
> Just following the django docs, it recommends Apache+mod_wsgi for the
> django app, and either lighttpd or nginx to serve media.  I liked the
> idea of serving media separately because the app is heavy on video
> streaming.  Is your suggestion to serve both the app and media using
> nginx?  Is this more secure?  Better performance?  Can you please
> point me to some docs that explain how to set up nginx for django?
>  Will google it in the meantime.
>
> Thanks a whole bunch.
>
> On Tuesday, October 30, 2012 3:50:30 PM UTC-4, Chris Pagnutti wrote:
>
>     Hi.  I want to set up a production server for a django
>     application.  constant.com <http://constant.com> offers Virtual
>     Private Servers which should give me virtually full control over
>     the server, allowing me to install django and all the stuff I need
>     for my app to run properly.
>
>     First, is this a good idea?  Do you think I can do this securely
>     using the django, apache, and lighttpd docs? or am I asking for
>     trouble?  What are the major security issues I need to be aware of
>     when administering a server?
>
>     Also, if I go this route, I'll need to choose an OS.  I'm running
>     a production server (just Apache + mod_wsgi) using my Arch Linux
>     box, but I don't think arch is the best idea.  I'm sorta trying to
>     decide between CentOS and Ubuntu.  Leaning toward CentOS, but just
>     a little worried it might be missing some of the packages I need.
>      I've never used CentOS before.  Any advice?
>
> -- 
> 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/-/Z-S0RK7YEicJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

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

Reply via email to