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
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; ## ...
3
votes
1answer
198 views

Split the same virtualhost configuration across multiple files

I have multiple django applications on my server that run each within their own virtualhosts, bound to different ports. (I do this so as to isolate each WSGIProcessGroup). Now I would like to proxy ...
3
votes
1answer
319 views

Django + Apache + mod_wsgi: Why is wsgi script executed multiple times?

I'm relatively new to all the server technology and I followed this tutorial to deploy my django app on an Apache Webserver, using mod_wsgi: ...
1
vote
1answer
253 views

Trying to run gunicorn from supervisor gives error - error: class uri 'simple' invalid or not found

I am already running successfully 2 django projects (in same virtualenv with python 2.7) with Django + gunicorn + virtualenv + Supervisord environment. But now i am trying to run another project in ...
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 ...
-3
votes
1answer
393 views

Change request URL setting in my Django Project with 'Nginx'

I am using Django with Nginx and Gunicorn. When I type in https://DomainName[dot]com in the browser below is the message that I get. Page not found (404) Request Method: GET Request ...
1
vote
0answers
391 views

Ubuntu Locales Incorrect for Python Application

I have a NGINX -> UWSGI -> Django(python) stack installed on an Ubuntu AMI on Amazon EC2. I've run into a problem when accessing a file with unicode characters in the name. The exact output from the ...
0
votes
0answers
48 views

MySQL response times spiking at regular intervals

I recently set up a windows Hyper-V VPS with a bitnami django stack. I am monitering the website with newrelic. I noticed that my MySQL database response times spike about every 30 min. My first ...
1
vote
0answers
55 views

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.. ...
0
votes
1answer
229 views

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. ...
0
votes
2answers
73 views

How can I redirect all HTTP requests to one host name and HTTPS to another?

Our lab has semi-control over a few domain names, from our "official" one example-lab.org to a couple others that are subdomains of our university (example.school.edu). We are trying to get an SSL ...
1
vote
0answers
251 views

Varnish server in front of nginx server with multiple virtualhosts

I have tried to search for a solution for this, but can't find any documentation/tips on my specific setup. My setup: Backendserver: ngnix: 2 different websites (2 top domains) in virtualenv, ...
0
votes
1answer
159 views

uWSGI snmp stats

I'm interested in collecting stats for uWSGI via snmp for graphing in Cacti. Per these docs I'm starting uwsgi with: uwsgi -s :3031 --udp 192.168.10.1:2222 --snmp --snmp-community foo --emperor ...
0
votes
2answers
616 views

cannot connect to my nginx server from remote machine

I thought that it's iptables problem.. but it seems not. I really have no idea about this situation. I'm getting a server hosting(CentOS). I installed Nginx + Django and nginx uses 8080 port. A ...
0
votes
1answer
310 views

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 ...
0
votes
1answer
360 views

Nginx proxy to s3 bucket gets 400 Invalid Argument

I have a Django app in which I serve media files through an nginx proxy to s3. The relevant python code response = HttpResponse() response['X-Accel-Redirect'] = '/s3_redirect/%s' % ...
0
votes
1answer
329 views

Why can't django-configurations pick up a SECRET_KEY environment variable from a heroku environment?

When trying to deploy a django app to heroku using django-configurations, I keep getting the error: ValueError: Couldn't setup configuration 'config.settings.Production': Secret value 'SECRET_KEY' ...
0
votes
0answers
77 views

Messed Up Virtual Hosting After Installing Django with mod_wsgi

I was tasked with setting up Django, which seemed to require mod_wsgi, on an Ubuntu server fairly recently, which I was able to get working through much ardor and trial and error. Unfortunately, I ...
0
votes
1answer
177 views

A good tool for parsing Nginx logs for Django app [closed]

Can anyone recommend a good tool to parse and analyze Nginx access logs which will group the urls based on the regex in my django urls.py files (or a config file generated from them)? It does not ...
2
votes
3answers
541 views

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 ...
1
vote
2answers
918 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 ...
0
votes
2answers
141 views

Connecting to SQL Server from Python Django

I have a Django site running on a Linux based server. My partner has SQL Server running on a IIS Windows server behind a Cisco router. We are looking for a secure way for the Django site to connect to ...
1
vote
1answer
199 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
0answers
201 views

How do I allow www-data to (negatively) change the niceness of a process in Linux?

So I'm running a website using django and sometimes I call scripts located on the server by spawning a subprocess in python. When looking at the processes with "top" I see these are called under the ...
-3
votes
1answer
111 views

What are some unnecessary processes in Ubuntu 12.04? [closed]

So, I'm using Ubuntu 12.04 for my AWS instances and when I first start it up and look at the processes there seems to be a lot of things running that I'm not sure are necessarily needed for my ...
0
votes
3answers
653 views

Nginx bad gateway (502) error on django 500 errors (instead of showing django 500 page) with DEBUG = False setting

I have a problem with my current setup... And the issue is, that if i set DEBUG = False in django settings.py file nginx stops showing django tracebacks on 500 errors, but does not show our 500 page ...
0
votes
1answer
74 views

Is it possible to manually specify an alternative Procfile on Heroku?

I have a repository which can be deployed in two modes: one is a front-end web application, while the other is a data manipulating process which runs non-stop, 24x7. The application runs on Django ...
2
votes
1answer
2k views

Supervisor process exits with 'exit status 1; not expected'

I'm trying to run a gunicorn_django process in supervisor but it always exits immediately, giving this error: INFO exited: my_app (exit status 1; not expected) INFO received SIGCLD indicating a ...
0
votes
1answer
352 views

Gunicorn error: “Error opening file for reading: Permission denied”

I'm getting an error when running my Django app with gunicorn: when I make a post request over 7800 bytes I see the following error from gunicorn: "Error opening file for reading: Permission denied". ...
0
votes
2answers
2k views

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 ...
0
votes
1answer
945 views

Apache as a reverse proxy not working for gunicorn

My Goal is to let client connect through https connection but apache serve it to my application which is running on same server over http. Here is my minimalistic apache configuration file (for ...
0
votes
1answer
24 views

How it's possible to reload a particular user Apache WSGI?

I have multiple WSGI instances running each on it's own user account. I'm trying to give the users to reload their own HTTPD processes only on Python/DJango code update, without impacting the other ...
0
votes
1answer
252 views

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 ...
1
vote
2answers
243 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, ...
0
votes
1answer
293 views

Why is uWSGI not loading the app specified in the nginx configuration?

I have a server serving multiple Django sites using nginx (1.1.19) and uWSGI (0.9.8). uWSGI is running in VirtualHosting mode and loading apps dynamically as documented here: ...
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 ...
0
votes
1answer
120 views

celery tasks from one domain appear on another domain's django admin hosted on the same box

I have a rather funny problem that I didn't manage to find it elsewhere. I have 2 django-celery projects running with redis on 2 different domains, but apparently hosted on the same box. I don't have ...
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
259 views

uWSGI Returning Empty Response

I have a Django site which I am trying to server via uWSGI. I have started the server like so: uwsgi --emperor . Ctrl+Z bg 1 (There are two .ini files which point to the test version and production ...
0
votes
2answers
106 views

uwsgi emperor mode - Warning message

I use uwsgi running in the emperor mode to serve multiple Django Applications on one server. Therefore for every project I have a own config file like this one: <uwsgi> ...
1
vote
0answers
105 views

“Error importing middleware” while upgrading to Django 1.5 from Django 1.4?

I have a shared hosting account with Python 2.7.2 installed. I have done a local installation of Django 1.4 (python setup.py install --user) and everything was working fine. I decided to upgrade to ...
1
vote
0answers
362 views

Python Threads and uWSGI Harakiri

I have a webapp that is using an API built on nginx, uWSGI, and Django. Recently I have been seeing a lot of harakiris on a particular API call which does some quick processing and then spawns a few ...
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 ...
0
votes
2answers
169 views

ubuntu linode server 404 error with django mod_wsgi [closed]

I have configured a linode server with apache2 and mod_wsgi.. the server is running wsgi is running postgre is running and syncdb was successful what I am having trouble finishing is actually ...
-2
votes
1answer
106 views

idle proccesses and high memory bad? uwsgi/django

I have a VPS with 256MB of ram. I'm running nginx, uwsgi and postgresql on Ubuntu 12.04 for a soon to be Django site. About 200MB of ram are being used despite the website not being active, the uwsgi ...
2
votes
1answer
825 views

Static file permissions with Nginx, Gunicorn and Django

I attempting to setup a Nginx server up with a Gunicorn WSGI server running Django behind.. The setup all seems to runs except i have a permissions issue. I have setup aliases to /media and a /static ...
0
votes
1answer
76 views

Performance issues with windows server, sql-server and apache

I am running into some performance issues on my server, which runs Windows server 2008, SQL Server 2008 R2, and apache. This is a purely internal website, and is accessed by a total of about 6 ...
2
votes
1answer
71 views

Apache2 server using a lot of CPU

The output of top Tasks: 68 total, 1 running, 67 sleeping, 0 stopped, 0 zombie Cpu(s): 96.0%us, 3.7%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Mem: 3840492k total, 1175776k ...
0
votes
0answers
339 views

Nginx, Django, Gunicorn work slow in specific situations

My problem is that when I log on to my application via facebook, or send an email it takes a very long time ( about 1-2 minutes ). In other situations site is reacting almost instantly. My application ...
0
votes
2answers
593 views

File uploads and client_max_body_size in nginx + gunicorn + django

I need to configure nginx + gunicorn to be able to upload files greater than the default max size in both servers. My nginx .conf file looks like this: server { # ... location / { ...