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

Enabling mod_wsgi in Apache for a Django app on Gentoo

I installed Apache, Django, and mod_wsgi on Gentoo using emerge (on Amazon EC2). I know that the mod_wsgi is configured in /etc/apache2/modules.d/70_mod_wsgi.conf: <IfDefine WSGI> LoadModule ...
0
votes
1answer
3k views

503 Error: Service Temporarily Unavailable (Mod_wsgi, Apache, Django)

I followed the tutorial to mount a Djando application on Apache here. The Django project was created under its own directory in /opt. Any suggestions or other tutorials I can use? I reviewed few ...
1
vote
1answer
15 views

django uwsgi and nginx = 400 bad request

I moved my Django website and pip3 install Django. I use the same uswgi wrapper than on the install of server #1 and it works. On server #2, I get a 400 Bad request. If I stop the uwsgi server, I get ...
0
votes
0answers
16 views

How can I configure a Django website to work with Apache 2.4 VirtualHosts?

I recently started developing Django websites and I want to deploy them on a CentOS VPS with mod_wsgi and Apache. I followed this guide and it works perfectly, but I would like to have more than one ...
1
vote
2answers
2k 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 ...
2
votes
1answer
2k 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
3k views

Error while installing with Python “pip”: Cannot fetch index base URL http://

I am trying to install a local version of ScrumDo for testing. Only then I come to the point in my installation that I have to run: source bin/activate pip install -r requirements.txt I get ...
1
vote
2answers
32 views

Django mobile template detection with nginx and varnish

I'm trying to get django-mobile (uses different template namespace depending on device type) when behind varnish and nginx. I thought I had it figured out, but with my current set up, it seems that ...
2
votes
1answer
1k views

Graphite not running

I'm currently trying to install graphite 0.9.9 on a gentoo box using these instructions from the graphite wiki. Essentially, it fronts graphite using apache and mod_wsgi. Everything seems to have ...
6
votes
1answer
5k views

Apache/wsgi “Script timed out before returning headers”

I have a custom Django app that's becoming unresponsive roughly every 5,000 requests. In the apache logs, I see see the following: Apr 13 11:45:07 www3 apache2[27590]: **successful view render here** ...
43
votes
8answers
118k views

Why do I get sqlite error, “unable to open database file”?

Using my Django app, I'm able to read from the database just fine. When the application didn't have permission to access the file, it gave me this error: attempt to write a readonly database ...
1
vote
0answers
18 views

start: Job failed to start UWSGI,

Trying to configure ubuntu+nginx+uwsgi+django upstart script /etc/init/uwsgi.conf description "uWSGI application server in Emperor mode" start on runlevel [2345] stop on runlevel [!2345] setuid ...
2
votes
3answers
36 views

Nginx: 502 Bad Gateway error with (111: Connection refused) to uWSGI socket while running django

I am building an app using an Nginx, uWSGI, Django and Postgresql stack. The app uses a Unix socket between Nginx and uWSGI. The file permissions on the socket is 775. But I still get this permission ...
2
votes
3answers
79 views

Nginx 1.2.1 custom 404

I'm trying to make a custom 404 error with nginx. First in my local machine I added the following lines to the default site: error_page 404 /custom_404.html; location = /custom_404.html { ...
7
votes
2answers
1k views

Deploying Django App with Nginx, Apache, mod_wsgi

I have a django app which can run locally using the standard development environment. I want to now move this to EC2 for production. The django documentation suggests running with apache and ...
0
votes
0answers
11 views

Django deployment: configuring correct python to be used by apache/mod_wsgi

I am new to working with Django based applications and trying to deploy a django project using following configurations, which are almost similar to the default given on django docs. apache2.conf # ...
1
vote
1answer
2k views

Debugging Gunicorn + Nginx + Django

I'm trying to deploy a readthedocs instance on my own server. The recommended way to deploy is using Gunicorn + nginx with postgres. Because there's basically no documentation on how to do this ...
0
votes
1answer
231 views

uWSGI backtrace: semgentation fault errors

I'm getting the following backtrace in my uWSGI logs, I don't know where to begin looking to figure this out: DAMN ! worker 5 (pid: 29056) died :( trying respawn ... Respawned uWSGI worker 5 (new ...
86
votes
1answer
18k views

Why do I need Nginx and something like Gunicorn?

I'm looking for an overly simplified answer to the following question. I'm trying to build a foundational understanding of how Nginx works alongside something like Gunicorn. Do I need both Nginx and ...
1
vote
0answers
74 views

Django Site with httpd and mod_wsgi: 403 Forbidden

I've spent the whole day trying to find an answer to my issue, yet I failed and decided to post my problem here instead. So I have develop a Django Application and now I'm having problems in deploying ...
3
votes
2answers
1k views

LDAP authentication with Graphite

I have setup Graphite Web 0.9.9 on CentOS 6.2 x86_64 at EC2 and I'm trying to get LDAP authentication to work against 389 Directory Server. I have configured local_settings.py with: USE_LDAP_AUTH ...
0
votes
0answers
31 views

Cant cache REST api by nginx

I use django through uwsgi for my API. I try this config upstream django_dev { ...
0
votes
1answer
2k views

nginx, gunicorn and django weird 504 gateway timeout

I have an nginx / gunicorn / django setup as follows: Nginx server { listen 80; server_name myserver.com; root /www/python/apps/pyapp/; access_log ...
0
votes
4answers
1k views

munin-cron Unable to Copy Contents

I recently installed munin on my (Fedora12 based) server. Now, I wanted to get all the graphs in a static directory (The application runs on Django). So, I edited the file /etc/munin/munin.conf by ...
6
votes
3answers
2k views

Is it possible to run automatically celery at startup?

I have python server based on django and celery. Each time computer restarts, apache2 starts so my server is working, BUT I have to restart celery manually (going to my project directory and executing ...
0
votes
1answer
2k 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 ...
1
vote
0answers
22 views

Django Invalid HTTP_HOST header: '\x80\xc7\xda\x9e'

I am getting errors from Django 1.7 application hosted in Digital ocean. Invalid HTTP_HOST header: '\x80\xc7\xda\x9e'. The domain name provided is not valid according to RFC 1034/1035. Request ...
13
votes
1answer
27k views

How to view connected users to open vpn server?

I'm developing a web site for managing open vpn users with django framework. But I need to now is there any way to extract active users from open vpn? My server is running Ubuntu 12.04.
0
votes
0answers
22 views

Directory index forbidden by Options directive:

I am trying to host a django app on centos 6.4 and django 1..6.5.I read many thread related to this error and applied whatever thread suggested but still I am getting the same error. <VirtualHost ...
-1
votes
1answer
787 views

503 errors on Apache+Mod_wsgi+Django

I'm new to Python and trying to setup Django on my VPS that is running CentoOS 6.5. My Apache version is 2.2.15. Python is running on version 2.7. I created a virtualenv under ...
0
votes
0answers
27 views

Amazon EC2 public DNS not working, getting nginx needs to be configured screen

I have successfully deployed a Django project. The Both the IP address and the domain name work. The Amazon EC2 public DNS doesn't work. When I navigate to ...
1
vote
1answer
62 views

Nginx and Gunicorn 'err_conn_refused', but nginx not logging error

I've been playing around with Django Cookie Cutter for local projects, and wanted to put it on my DO Droplet as a semi-production staging environment. The server is set up with Nginx reverse ...
1
vote
2answers
1k views

504 Gateway Time-out uwsgi + nginx django application

I'm trying to run my Django application using Nginx + uwsgi, but I receive 504 Gateway Time-out after one minute of loading. My app takes time to do what needed as it searches for specific things on ...
-1
votes
1answer
35 views

Apache Error (AH01276), Cannot serve directory /var/www/project/:

I am trying to deploy a Django web app on a newly installed centos7 server. for this i am using apache2.4 with mod_wsgi. i am stuck at serving the static files and because i am new to this, this is ...
0
votes
1answer
30 views

Proxy using nginx

I'm in the midst of a significant rewrite/update of group of services and am struggling with geting Apache/Nginx/Django to play nice with each other. What's happening here is there is an internal ...
0
votes
0answers
31 views

Python/Django/WSGI/Apache webserver gateway timeout with outgoing SSL connections with urllib2/urllib3/requests

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. Outgoing connections with any of urllib2, urllib3, or requests, connections to non-SSL (on port 80) ...
1
vote
0answers
17 views

urllib3 failure through Apache/WSGI; successful from python commandline

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. When first setup, outgoing connections from this webserver using the Python library urllib3 were ...
1
vote
1answer
78 views

Getting SSL to work on Django project

I'm trying to get my Django website to move entirely to https (currently it's solely http). The webserver is nginx (reverse proxy) and gunicorn. However, even after correctly installing SSL, opening ...
0
votes
0answers
26 views

application's stdout to NginX's error_log - same as mod_wsgi

I have Django project served via Apache (mod_wsgi) - recently switched to NginX + uWSGI. Currently I have it served via both at different ports to benchmark the overall performance gain. One issue I ...
1
vote
2answers
71 views

Docker cannot access Webserver on host

I'm trying to setup pythons django inside a dockerized environment Dockerfile FROM python:3.5-slim ENV PYTHONUNBUFFERED 1 RUN mkdir /code RUN pip install --upgrade pip WORKDIR /code ADD ...
0
votes
0answers
26 views

python server running but nothing in web browser

I have python server running in terminal but I don't get anything in my web browser, beside it, below is written django 1.8.3 but I made upgrade to django 1.9.2: (env)root@mx:/srv/mercury# python3 ...
0
votes
1answer
76 views

Nginx, angularJS, django and phantomJS configuration

I have succesfully set up Django, angularjs and phantomJS (for SEO purposes) to work together, however I am having a small problem with routes. http:// something.com/?_escaped_fragment_= gets ...
19
votes
3answers
4k views

Why is setting Nginx as a reverse proxy a good idea?

I have a Django site running on Gunicorn with a reverse proxy through Nginx. Isn't Nginx just an extra unnecessary overhead? How does adding that on top of Gunicorn help?
0
votes
1answer
27 views

What user should run the gunicorn process?

When running a Django application on a Debian server, should you create some sort of application user (e.g. "myappuser") and run the gunicorn process as that user or can/should gunicorn be run as ...
1
vote
1answer
88 views

Unable to restore postgresql data dump for Django app hosted on Azure VM

I am trying to restore a postgres data dump for a Django app of mine. The data dump was extracted from Heroku, and pg_restore is being run on an Azure VM with Linux on it. There are around 40 tables ...
0
votes
0answers
134 views

Multiple Gunicorn daemons for Django projects with Nginx result in 502 Bad Gateway for one

I want to run two Django applications on the same server, with Nginx and Gunicorn. I can run them separately, but not both at the same time: When I try, one is OK, but for the other one I receive 502. ...
0
votes
1answer
34 views

What is right way to tmux with fabric django?

1.I am doing this on local machine tmux new -s amazon then I ssh in to the server into tmux window shh user@amazon then I detach it ctrl b-d Into fabfile.py I am doing like this local("tmux ...
0
votes
0answers
12 views

Apache cannot change location errorlog in virtual host

I use the directive ErrorLog ${APACHE_LOG_DIR}/error1.log in a virtual host. But the output error is still in error.log. I have restarted apache but things doesn't work. However, the relocation of ...
0
votes
2answers
50 views

Nginx configuration for long-running tasks

I have a web-based application that conducts some linguistic analysis of user-submitted texts. This is a rather memory-intensive task and typically takes an extended period of time (e.g., up to 3 ...
1
vote
1answer
382 views

django, fastcgi, throws random 404 errors

I have a django website deployed on a shared webhost. The shared webhost uses fastcgi. I'm noticing that valid urls will randomly throw up http404 but as soon as I refresh will work again. does anyone ...