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
750 views

Why, when everything is working properly, an apache restart writes into error.log?

This is just a minor nitpic, but I wonder if anyone can tell me the reason - when I restart apache, these lines get written into /var/log/apache2/error.log [Thu Mar 24 10:20:56 2011] [warn] mod_wsgi: ...
1
vote
2answers
919 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
748 views

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

Django LDAP - How to map description field to Django group

I'm trying to set up LDAP authentication with my Django app using Django-Auth The basic idea I want to do is any LDAP user with "IT - Help Desk" in the description would get mapped to a certain ...
1
vote
1answer
719 views

Running Django sites through Upstart

I host a few Django sites on one of my Ubuntu servers. Up until recently I've been using the Cherokee HTTPd which has the option to launch back-end applications like Django sites but I've just ...
1
vote
2answers
119 views

'mysql' Command not Connecting as used from PATH but Works if Full Path is Used

Not sure how to fix this but here is the description. I can run the command to a Lampstack MySQL installation like this and it works: /opt/lampstack/mysql/bin/mysql -u root -p And my PATH variable ...
1
vote
1answer
490 views

Django error saying “could not connect to server: Permission denied”

I am getting an error trying to visit my Django app. I am running Gentoo and the web server is Apache with the mod_wsgi module to display Django. The error says OperationalError at /admin/ could not ...
1
vote
2answers
3k 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
494 views

chmod a folder permanently

kind of a newbie to server stuff. I am running a centOS setup with whoosh search engine for my django app. Everytime I restart or rebuild my index i get a warning that states IOError: The path to ...
1
vote
2answers
160 views

Serving static web files off a non-standard port

I'm close to deploying a Django project to production. I'm looking over some infrastructure decisions. Something that came up was serving static files with a different server such as lighttpd. ...
1
vote
1answer
317 views

lighttpd configuration for running django and legacy website together

I'm planning to migrate an old website to django. Initially, I want to use django for the urls www.mydomain.com/news, and continue to use the old static website for everything else. I have little ...
1
vote
1answer
810 views

Connection refused while connecting to upstream

I'm running a Django website with nginx via fastcgi running on a TCP port 9000 on localhost. Everything appears to work correctly, but the error log is filled with lines like these: 2012/11/19 ...
1
vote
3answers
2k 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
566 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
319 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
2k 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
394 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
757 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
50 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
392 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
461 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
95 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
244 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
4answers
4k views

Python-devel for python 2.7 on CentOS 6.4

Ok, i want to run django web-application on production VPS. Operation system of the VPS is CentOS. Application code written on Python 2.7. I have already installed Python 2.7 with configured virtual ...
1
vote
1answer
144 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
979 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
548 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
2k 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
512 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
627 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
3answers
275 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
289 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
542 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
564 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
1answer
310 views

Unable to run Django on Mac OS X

I'm working with a Django project on my Mac (running Leopard) and I want to show it to my team. I've already passed the neccessary port forwards from my router to my Mac's LAN IP address but it ...
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
124 views

Django: CONN_MAX_AGE persists connections, but doesn't reuse them with PostgreSQL

I've got a django setup are using Django 1.6.7 and Postgres 9.3 on Ubuntu 14.04 LTS. At any given time, the site gets about ~250 simultaneous connections to the PostgreSQL database, which is a Quad ...
1
vote
1answer
97 views

Nginx and Django use www-prefixed domain

Trying to understand how to force www. in my domain and redirect anything like ww.example.com or test.example.com -> www.example.com Everything works fine when I go to www.example.com or example.com, ...
1
vote
1answer
362 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
1k 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
1k 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
200 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
75 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
34 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
165 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
236 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
1answer
955 views

How is it possible for mod_wsgi to be compiled against Python 2.7.3 but use the 2.7.2 runtime?

The following is what appears in my error_log: [Sat Nov 17 23:13:14 2012] [warn] mod_wsgi: Compiled for Python/2.7.3. [Sat Nov 17 23:13:14 2012] [warn] mod_wsgi: Runtime using Python/2.7.2. If I ...