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 ...

learn more… | top users | synonyms

1
vote
3answers
1k views

gunicorn + django + nginx unix://socket failed (11: Resource temporarily unavailable)

Running very high volume traffic on these servers configured with django, gunicorn, supervisor and nginx. But a lot of times I tend to see 502 errors. So I checked the nginx logs to see what error and ...
1
vote
2answers
416 views

Apache logs: do lots of 404s on CONNECT to port 443 indicate a vulnerability?

In my logs I keep getting lots of: "CONNECT XXX.XXX.XXX.XXX:443 HTTP/1.0" 404 218 "-" "-" "CONNECT XXX.XXX.XXX.XXX:443 HTTP/1.0" 404 218 "-" "-" ... "CONNECT XXX.XXX.XXX.XXX:443 HTTP/1.0" 404 218 "-" ...
1
vote
2answers
291 views

multiple instances of nginx in order to keep Django projects separate

I'm building an app using Django + PostrgreSQL + Nginx on Debian 6. The app has two separate components, that will later be on different machines. Component A calls one function from Component B ...
1
vote
1answer
1k views

How do you choose the EC2 instance for your django app? [duplicate]

Possible Duplicate: Can you help me with my capacity planning? My team has created a nice django app and now it is going to be deployed on an EC2 instance. Now there are a few questions ...
1
vote
2answers
2k views

Django, nginx, FastCGI - running via unix sockets, permission problems

I've configured nginx to run django site via socket: fastcgi_pass unix:/tmp/django.socket; now I'm (manually) running ./manage.py runfcgi socket=/tmp/django.socket http request results in 502 ...
1
vote
2answers
365 views

What is the IIS equivalent of mod_wsgi's WSGIScriptAlias?

I'm trying to get Django running on IIS 6 using pyisapie and I'm having some trouble. I have pyisapie working on IIS, but it only works if I specify the full url to a specific python script like so: ...
1
vote
3answers
728 views

Reloading mod_wsgi processes safely in production

Is there a way to safely restart mod_wsgi processes on demand, possibly running on multiple machines? I'm serving a django app with mod_wsgi in daemon mode with apache: WSGIDaemonProcess myapp ...
1
vote
1answer
183 views

Redirect all subdomains to main domain with lighttpd and regex

Is it possible to redirect all *.domain.com to my domain.com? I have been messing around with the Regex but without any luck: $HTTP["host"] =~ ".*\.domain\.com" { url.redirect = ...
1
vote
1answer
165 views

Ubuntu 12.04 Server - Django with uWsgi not working

I am fairly new to working with servers. I am attempting to run Django on an Ubuntu 12.04 AWS with uwsgi & nginx. I found a tutorial that I was following: ...
1
vote
2answers
59 views

What Files Should I Set Up for Clean Apache Configuration

I am not new to Apache but nor am I an expert (by any means). I've run sveral versions of WAMP and XAMP server set-ups. Most of my Apache configurations are simple. I usually run a default master ...
1
vote
2answers
534 views

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 ...
1
vote
2answers
128 views

Unicode characters in nginx fastcgi links

I have a django project hosted over nginx with fastcgi. Django has some urls that user cyrillic characters. But when I try to open page with such link, django tells that it doesn't have such model, ...
1
vote
1answer
103 views

Configuring htaccess with django and apache

I am trying to configure my apache server with django. I am having issues matching urls to their views and am not quite sure of the cause of the problem. I have the following configuration: ...
1
vote
2answers
809 views

“Connection in use” running Gunicorn using VirtualEnv

I am trying to set up a development environment using Gunicorn and NGINX. While following this tutorial: http://ijcdigital.com/blog/django-gunicorn-and-nginx-setup/ I get the following error: ...
1
vote
1answer
515 views

Nginx,Uwsgi and Django App Not Found

I have configured Nginx with uWSGI and Django on CentOS. Django Directory(contains all my django app): /home Django Project Directory: /home/hdblog /home/hdapp.py contains below: import os, sys ...
1
vote
2answers
1k views

How to run Django 1.3/1.4 on uWSGI on nginx on EC2 (Apache2 works)

I am posting a question on behalf of my administrator. Basically he wants to set up Django app (made on Django 1.3, but will be moving to Django 1.4, so it should not really matter which one of these ...
1
vote
2answers
2k views

Do I need the ports.conf Apache configuration?

I am using nginx to serve static content and proxy requests to Apache for serving Django. I have multiple domains, and each domain has it's own port and Apache VirtualHost config. For example, ...
1
vote
3answers
455 views

How to let python/django to access postgres db without requiring sudo -u

Still new in the Linux / django / python / postgres installation. I have install the latest kubuntu 11.04, installed the postgres and django packages. I have created a django_login in postgres with a ...
1
vote
3answers
613 views

Which user account should be used for WSGIDaemonProcess?

I have some Django sites deployed using Apache2 and mod_wsgi. When configuring the WSGIDaemonProcess directive, most tutorials (including the official documentation) suggest running the WSGI process ...
1
vote
2answers
1k views

Django Apache WSGI - very slow production server

I'm scratching my head on this one. Django is installed on my production and dev servers but the live server under not ver heavy load is running extremely slow. Every page is taking more than 30 ...
1
vote
3answers
273 views

Subdomains vs folders/directories

I'm currently building a web application and I would like my users to have their own URLs to identify them. I could either do this using subdomains or using folders and am wondering what are the ...
1
vote
4answers
277 views

Securing Django deployment on Ubuntu server

I am just starting out with Django and want to deploy a test application on a Linux VPS that I have. I am not familiar with how I can secure the deployment. If I configure Apache to serve the ...
1
vote
1answer
495 views

MySQLdb on Windows

I'm trying to run the simple django tutorial on my windows 7 machine after having just read the python tutorial. But it complains, "django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb ...
1
vote
1answer
484 views

How can I deploy a django application to multiple servers efficiently?

What are a few options to deploy changes made to a django project to multiple servers simultaneously in an efficient manner? Are there any tools that would allow servers to checkout latest changes ...
1
vote
3answers
109 views

Redirect www.example.com to www.example.com/home/

Im currently writing a django website, and ive got a bunch of flatpages that are my basic website. What i want is www.example.com/home to be the main website flatpage, but when people go to ...
1
vote
3answers
2k views

How to debug slow queries in Django+Postgres

My database queries from Django are starting to take 1-2 seconds and I'm having trouble figuring out why. Not too big a site, about 1-2 requests per second (that hit Django; static files are just ...
1
vote
2answers
2k views

What should the DJANGO_SETTINGS_MODULE be set to in Apache when deploying a django app?

I'm deploying a django app, but I can't seem get the settings correct in the Apache configuration. I've put my django app in /path/to/mysite.com/teabag/current/ DirectoryIndex index.html ...
1
vote
1answer
38 views

Distributing load from Django App

I am currently approaching stages to move my first large-scale application out of development. I have talked with some CTOs who know what they're talking about, and I have been advised to do the ...
1
vote
1answer
88 views

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 ...
1
vote
1answer
140 views

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 ...
1
vote
1answer
146 views

Django WSGI application in a subdirectory?

Recently, I wanted to put one of my WSGI applications into a subdirectory, so that the other directories that cointain various scripts would work as before. In order to do that, I added the following ...
1
vote
1answer
617 views

Nginx + uwsgi… 502 bad gateway

So I am trying to set up Nginx with uwsgi for my Django app. Here is my /etc/nginx/nginx.conf file: # /etc/nginx/nginx.conf user richard richard; ## Default: nobody worker_processes 5; ## ...
1
vote
1answer
382 views

Django doesn't find CSS files for admin pages using uWSGI

Even if I followed the official instructions, when I start a Django test site using uWSGI, CSS files for the admin interface are not loaded. If I open the URL of a CSS file, for example ...
1
vote
1answer
121 views

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. ...
1
vote
1answer
56 views

Apache Django OOM on server with 4GB RAM

I'm running a production Django site on Ubuntu Linode w/ 4GB RAM. Major processes are Apache2, MongoDB, Memcache, PostgreSQL, Tomcat6 and Redis. Apache OOMs about 10 times a day. I've tweaked values ...
1
vote
1answer
29 views

where is the configuration for https host Django+PHP

I am an app developer, with little web site development experience, now having to check some work on a virtual server, All seems to be working fine, but I cannot find where a configuration for a host ...
1
vote
1answer
143 views

only django work in presence of mod_wsgi , PHP not working

I am using PHP with apache2 and MySQL on a rackspace server, it is unmanaged cluoud hosting. I am hosting multiple sites using virtual host. Now i want to use Django on it. A site needs django so I ...
1
vote
1answer
195 views

Installation requirements of django installing in hostgator dedicated server

First, before I install OSQA on my dedicated server at hostgator, I want to know the requirements. I don't want to screw up my server so it's better to ask question first. I have read a lot of ...
1
vote
2answers
344 views

NGinX config for Django and Wordpress in subdirectory

I need to set up a Django site at the root of a domain, but then have a Wordpress installation in a subdirectly (e.g. /blog/). How would one configure NGinX to do this? "Pretty" URLs have to work for ...
1
vote
1answer
543 views

uWSGI & Django 1.4 - Bad Gateway and no error

I am having trouble getting Django and uWSGI to play nice on Ubuntu (12). It seems that the wsgi is loading and then the app is immediately crashing. None of the uwsgi logs are giving me anything to ...
1
vote
1answer
518 views

Django, PostGIS, Postgres on Mac OS X Installation Issues [closed]

So the context Django1.4.x doesn't support postgis2.0 (https://code.djangoproject.com/ticket/16455) Postgres9.2x doesnt support postgis1.5 ...
1
vote
1answer
64 views

Designing server setup for 80 req/sec site - will this do? [duplicate]

Possible Duplicate: Can you help me with my capacity planning? I am tasked with designing a server setup for a site that has to handle about 5k requests per minute (80 - 90 per second). The ...
1
vote
1answer
278 views

How can I optimize system resource usage for many different gunicorn powered Django sites with low traffic?

My server is a Linode with 768MB of RAM. It is home to around 8 small, low traffic Django sites powered by Nginx, Supervisor, and Gunicorn. Currently, each site has its own Linux user account, with ...
1
vote
2answers
396 views

Why Won't Apache Fully Stop or Restart? I have to manually Kill every time

I have a configured EC2 server running Ubuntu 11.10 running a Django App on Apache2/WSGI. This server works perfectly, stops and restarts without any problems. When I clone this instance, everything ...
1
vote
1answer
475 views

uwsgi memory usage optimisation

I'm running several django sites on uwsgi, and I'm attempting to optimise my configuration for memory usage, but the --idle and --die-on-idle flags don't seem to be doing anything. Each daemon starts ...
1
vote
1answer
470 views

Arch Linux with an nginx/django setup refuses to display ANYTHING

I'm on Amazon Ec2, with an Arch Linux server. While I truly am loving it, I'm having the issue of actually getting nginx to display anything. Everytime I try to throw my hostname into the browser, the ...
1
vote
1answer
2k views

How do I upgrade Django 1.3.1 to 1.4? Any tips, tutorials, or warnings?

Django 1.4 was recently released. Almost all the information about Django 1.4 is in the release note, but I didn't see anything about how to upgrade. Should I just remove the django folder inside ...
1
vote
1answer
446 views

Database access Problems with Django and MySQL

I've got Apache and mod_wsgi up and running, and am now trying to introduce Django to MySQL. I've created a database named 'django' and a 'django' user; and I've granted all to django on django: ...
1
vote
1answer
218 views

Access content via a LAN connected machine which is Django-WSGI-Apache configured

I configured my system to be able to deploy Django stuff using Apache on my machine(Ubuntu 11.10).I followed the instructions given at ...
1
vote
2answers
2k views

How do you serve multiple domain static files with nginx in front of apache?

I would like to run multiple domains from the same server. I would like nginx to sit in front of apache and serve static files. So requests for one.com/site_media/logo.png points to ...