Help getting started: Which server setup for a beginner? Apache? lighttpd? To use or not virtualenv?

92 views
Skip to first unread message

Jared Nielsen

unread,
Jul 30, 2013, 11:48:18 AM7/30/13
to django...@googlegroups.com
I'm trying to learn Django but finding myself lost in troubleshooting hell. I can't find consistent information on the best approach for a beginner to get set up.

I started setting up Apache with mod_wsgi, but ran into innumerable config errors. After some Googling about, I found a number of suggestions to use lighttpd instead. Installed that and more troubleshooting. And what's this about gunicorn?

What's the best approach for a beginner? Where is my time best spent troubleshooting?

Also, should I be using virtualenv? Inconsistent use across the various tutorials I'm reading.

Many thanks in advance!


Karl Arunachal

unread,
Jul 30, 2013, 11:54:37 AM7/30/13
to django...@googlegroups.com
If you are in windows, I guess i can help you.




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tom Evans

unread,
Jul 30, 2013, 11:55:03 AM7/30/13
to django...@googlegroups.com
On Tue, Jul 30, 2013 at 4:48 PM, Jared Nielsen <nielse...@gmail.com> wrote:
> I'm trying to learn Django but finding myself lost in troubleshooting hell.
> I can't find consistent information on the best approach for a beginner to
> get set up.
>
> I started setting up Apache with mod_wsgi, but ran into innumerable config
> errors. After some Googling about, I found a number of suggestions to use
> lighttpd instead. Installed that and more troubleshooting. And what's this
> about gunicorn?
>
> What's the best approach for a beginner? Where is my time best spent
> troubleshooting?

If you're a beginner, ignore every webserver there is and just use
runserver. When you reach the limits of runserver, or when you need to
deploy to a webserer so other people can use your site, then and only
then think about it.

I am very much not a beginner, and I exclusively use runserver to
develop - for ease of use and closeness to the code, there is not much
better, and definitely nothing easier.

>
> Also, should I be using virtualenv? Inconsistent use across the various
> tutorials I'm reading.

You absolutely should be using virtualenv, this isn't a Django thing,
but best practice for developing and deploying python applications.
It's really straightforward to use, it doesn't change how you use
python, only how you install packages, and hence it is really
orthogonal to any Django tutorial.

Cheers

Tom

Javier Guerra Giraldez

unread,
Jul 30, 2013, 12:00:28 PM7/30/13
to django...@googlegroups.com
On Tue, Jul 30, 2013 at 10:48 AM, Jared Nielsen <nielse...@gmail.com> wrote:
> I started setting up Apache with mod_wsgi, but ran into innumerable config
> errors. After some Googling about, I found a number of suggestions to use
> lighttpd instead. Installed that and more troubleshooting. And what's this
> about gunicorn?


if you're a total beginer, and doesn't have any previous experience
setting up and deploying web servers, I'd advice to just avoid the
issue until you're comfortable with Django itself.

IOW: stay with the development server (the one that runs with "python
manage.py runserver"). When you have a project or two that want to
deploy, then start planning your deployment strategy.

in any case, i think many people agree that gunicorn is one of the
easiest to setup. I myself like nginx+uWSGI, and many others like
Apache+mod_wsgi, but none of these are needed for development.

--
Javier

Jared Nielsen

unread,
Jul 30, 2013, 7:09:27 PM7/30/13
to django...@googlegroups.com
Thanks everyone!
This was all very useful advice. Wish I had known all this days ago...





--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/W6r8f-Ec7lY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Kelvin Wong

unread,
Aug 1, 2013, 9:29:21 AM8/1/13
to django...@googlegroups.com
It is def worth taking the trouble to learn how to use virtualenv and virtualenvwrapper. Once they are set up and assuming that you haven't already put too much already into your global site-packages, they will save you time and greatly simplify keeping different project environments separate.

You didn't mention if you were on a Mac or what. On a UNIX dev machine setting up virtualenv and the wrapper are fairly straightforward.

K
Reply all
Reply to author
Forward
0 new messages