Django, "the web framework for perfectionists with deadlines", is a Python-based framework for creating web applications. With a powerful object-based database mapper, a clean syntax for mapping URLs to views, a simple template language and a convenient automatically generated administration interface, Django is the most popular of the Python web frameworks.
Questions tagged [django]
1012 questions
2
votes
2 answers
Nginx + Apache mod_wsgi, troubles understanding how to configure servers
I've been trying for too long to set up a development environment on my Ubuntu 12.04. My intention is to set up everything as I'd have to do later in a production environment, so I followed this tutorial on how to set up Nginx as a reverse proxy…

Rubén Cabrera
- 171
- 1
- 9
2
votes
0 answers
How to deploy django with uWsgi and nginx on CentOS
My version of Django is 1.6.3
I downloaded uwsgi-2.0.4. Someone says installing uwsgi with command make while someone use python setup.py build. What exactly is the difference?
I saw a tutorial that says create a python file named django_wsgi.py,…

Crayon
- 21
- 2
2
votes
0 answers
upstream timed out (110: Connection timed out) while reading response header from upstream
For some reason, I am getting this error whenever I am running a query on my server. On my local setup, this query takes around 7-8 seconds to return, but it keeps timing out on my actual server.
Errors:
2014/03/26 13:40:13 [error] 11084#0: *22…

abisson
- 121
- 1
- 3
2
votes
1 answer
Is graceful restart of Apache forcing to reload all python modules handled by mod_wsgi?
If I want to be sure that all python modules are recompiled and reloaded in my Django project under mod_wsgi and Apache, is it enough to restart apache gracefully with:
/etc/init.d/apache graceful
or should I always do the full restart…

Aidas Bendoraitis
- 1,465
- 2
- 14
- 17
2
votes
3 answers
Django Setup - One project, multiple subdomains with Nginx + Apache2
I am using Nginx as a front end web server redirecting Python requests to Apache + mod_wsgi. Everything with that is working fine. I have one Django project running and I want to setup subdomains for a few of my project apps.
Proposed…

Mark Stahler
- 283
- 3
- 8
2
votes
1 answer
Running multiple Django projects within Apache, sys.path being over written
I have been trying to research how to do a multiple Python / Django deployment using Apache VirtualHosts.
The issue I am encountering seems straight forward,
ImportError: Could not import settings 'hub.settings' (Is it on sys.path?): No module named…

Tim
- 23
- 1
- 3
2
votes
0 answers
How to tell apache to look for last modified date before serving an old modified HTML file?
On certain requests my Django application updates static HTML files.
However apache is serving them old copy from its cache...
How can I configure Apache to make sure serve latest file changes..
This changes are not so frequent but as changes are…

shahjapan
- 141
- 1
- 13
2
votes
1 answer
Can I configure apache/mod_wsgi so that the Alias URL path is not stripped before it reaches my Django app?
I am trying to configure Apache to host a Django webservice and a PHP website.
All URLs with the pattern www.mysite.com/api should be directed to the Django service.
All other URLs (e.g. www.mysite.com) should be directed to the PHP website.
My…

David Jones - iPushPull
- 123
- 1
- 5
2
votes
1 answer
What exactly is an invalid HTTP_HOST header
I've implemented Django's relatively new allowed hosts setting, which is meant to prevent attackers from submitting requests with a fake HTTP Host header.
Since adding that setting, I now get anywhere from 20-100 emails a day notifying me of…

rolling stone
- 123
- 1
- 5
2
votes
3 answers
Logging doesn't work after rsyslog upgrade
I have several different django applications under apache on a Red Hat server. These applications use SysLogHandler for sending log messages to the local rsyslog service. In order to pipe log messages from different django applications to different…

alecxe
- 81
- 1
- 2
- 16
2
votes
2 answers
Celery with Upstart - processes are dying unexpectedly
When I'm running Celery with Upstart, after a while, the child processes or the main processes die without any trace.
The Upstart script I'm using (/etc/init/celery):
description "celery"
start on runlevel [2345]
stop on runlevel [!2345]
kill…

yprez
- 183
- 1
- 10
2
votes
1 answer
nginx is no longer working on ec2 instance
i admittedly ran this:
sudo update-rc.d nginx defaults
which seemed to wipe out the setup of nginx. Nginx commands like sudo service nginx start, etc no longer return anything when executed. However, My nginx files for my django app are still…

user700070
- 153
- 3
- 8
2
votes
2 answers
Nginx + Gunicorn + Django - nginx not allowing static files
Updated Code - this is still not working though.
Settings.py
STATIC_ROOT = '/home/ubuntu/virtualenv/mysite/homelaunch/static/'
STATIC_URL = '/static/'
nginx conf :: /etc/nginx/sites-enabled/mysite
server {
server_name…

user700070
- 153
- 3
- 8
2
votes
2 answers
nginx django suburl doesn't work
I'm trying to setup django under some suburl, lets say /myproject, with nginx and uwsgi. However, I can't get it working. Whatever I try, seems that uwsgi_modifier1 30; option doesn't work. I always get doubled path, instead of…

Rapolas K.
- 133
- 1
- 4
2
votes
2 answers
https www not able to redirect to non-www https nginx
I can't seem to redirect my https://www to https:// How it is currently the site thinks that www. is a completely separate site. I want to redirect properly, but when I add configuration on what I think is correct I get an infinite redirect.…

Buddy Lindsey
- 269
- 3
- 9