Help - how to deploy to nginx in windows

688 views
Skip to first unread message

frocco

unread,
Jan 17, 2013, 10:45:26 AM1/17/13
to django...@googlegroups.com
Hello,

If I create a base django app, how can I get it to run using nginx in windows?
I keep getting 404 errors.

Thank you

Nikolas Stevenson-Molnar

unread,
Jan 17, 2013, 1:48:08 PM1/17/13
to django...@googlegroups.com
Nginx is just a proxy server, you still need something behind it to run
your Django project. I recommend gunicorn (http://gunicorn.org/). It's
easy to use and is commonly used with Nginx.

_Nik
> --
> 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/-/eeQT6VYHS8EJ.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

frocco

unread,
Jan 17, 2013, 2:34:11 PM1/17/13
to django...@googlegroups.com
Thanks,

Are there any examples on how to get this up and running on windows?

Nikolas Stevenson-Molnar

unread,
Jan 17, 2013, 2:52:11 PM1/17/13
to django...@googlegroups.com
Here's an Nginx package for Windows: http://kevinworthington.com/nginx-for-windows/

Once you have Nginx installed, configuration is about the same as for any other platform. The gunicorn site has an example Nginx configuration you can adapt: http://gunicorn.org/#deployment

You also need to run gunicorn itself. You can install it with pip (if you haven't already). Then there are several ways to run it; just have a look at their docs. I usually do something like: gunicorn --daemon myproject.wsgi:application

Keep in mind that gunicorn won't auto-reload your project when you change the code (like the Django dev server does) so when you make updates, you'll need to restart gunicorn.

_Nik
--
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/-/vX6-aRqt7SwJ.

Nikolas Stevenson-Molnar

unread,
Jan 17, 2013, 2:54:46 PM1/17/13
to django...@googlegroups.com
Actually, it looks like those are Nginx builds for cygwin. If you want native Windows builds, the Nginx site itself has those: http://nginx.org/en/download.html

_Nik
Reply all
Reply to author
Forward
0 new messages