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

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

Setting up own domain (with Django and Apache2)

I am running a website on a VPS using apache2 and Django on Debian. I felt as if it would be fun to give it its own domain instead of just using the IP, which works fine. After purchasing one, I ...
1
vote
1answer
1k 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 ...
-2
votes
0answers
5 views

Deploy Django-Httpd on Centos

I am trying to deploy a Django on Centos with httpd. I try to follow many dicumentations and tutorials but none of them is working. Is there any step by step document/tutorial that really works and ...
0
votes
1answer
17 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 ...
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 ...
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 ...
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 ...
2
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 ...
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
18 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 ...
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 ...
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
35 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
50 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. ...
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 ...
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 ...
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 ...
0
votes
1answer
19 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 ...
6
votes
1answer
4k 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** ...
0
votes
0answers
11 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
39 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
366 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 ...
0
votes
1answer
80 views

Postgresql Error: could not receive data from client: Connection reset by peer

I try this stack: nginx + uwsgi + django + postgresql, the request can reach to views of django, client show 500 server internal fault, I check postgres log, found the error could not receive data ...
1
vote
0answers
16 views

Can I give a staff user delete access without change access?

I manage a django-1.6 application where I want to give a staff user access to delete instances of a specific model through the /django interface without giving that staff user access to change ...
2
votes
2answers
1k views

django + wsgi + suexec + userdir + apache?

I've got a django 1.1 website I want to run in wsgi (as that seems to be the recommended deployment on apache). I want it to run as the www user (apache is running as www-data). I would ideally like ...
1
vote
0answers
35 views

Health-check daemon doesn't send Host header

I have a django application running behind nginx. All of it is running behind a load balancer. Load balancer is using HTTP health-check to enable/disable nodes. The problem is that health-check ...
2
votes
2answers
229 views

Re-uploading file with unicode filename creates identical duplicate

I'm running a Django site on a Debian 6 system, with a gunicorn server and nginx 0.7.67 handling static files. The filesystem locale is set to sv_SE.UTF-8. I got a problem where another user uploaded ...
0
votes
1answer
42 views

'Invalid input syntax for type inet' db error in Django app with postgres when Gunicorn+Nginx(reverse proxy) installed

I have a Django app with postgres back-end where I'm configuring gunicorn to work behind nginx as reverse proxy. My machine runs Ubuntu 14.04. Everything seems to have worked, except I've run into a ...
0
votes
0answers
20 views

After deploying django app to Elastic Beanstalk, all environmental variables are lost

Each time I use eb deploy to deploy a new version of my Django app to Elastic Beanstalk, it acts as if it has successfully deployed and then all requests start failing. If I ssh into the actual ...
0
votes
1answer
177 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 ...
1
vote
1answer
154 views

setup ssl on nginx for a django project

I want to setup ssl for nginx, my project is a django and i also use gunicorn as wsgi http server. I add following lines in my settings.py code : CSRF_COOKIE_SECURE = True SESSION_COOKIE_SECURE = ...
0
votes
0answers
9 views

Number of Apache ModWSGI threads for Django App?

Is there any point of specifying the number of threads for a Django app running in Apache's ModWSGI, and if so, what would the optimal value be? This post explains how to best select the number of ...
-2
votes
1answer
189 views

Sending emails via django does not work on Gunicorn / NGinx`

I am trying to send an email from my django application. However, this does not work on my NGINX (used for static resources) + GUNICORN Server. But, the same works on django's default webserver. I ...
2
votes
1answer
816 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 ...
24
votes
3answers
10k views

How do I make uWSGI restart when a Python script is modified?

Can't remember where, but I read uWSGI can reload itself like Django development server when a project script is modified. I can't find that in the docs, nor in the internets. How can I do this? I ...
0
votes
0answers
65 views

How to use ssl everywhere except an endpoint

I have a Web site where I want all requests to be done with HTTPS except for requests to urls with paths that start with /out/. nginx is configured as proxy to serve gunicorn/django content from ...
8
votes
1answer
2k views

Celery Daemon receives unregistered tasks

I installed Celery for my Django project following what the official tutorial / doc says. And it's working fine when I launch celery at the command line, I can see it receiving the tasks and execute ...
2
votes
3answers
507 views

In Djano, why do I get a 500 server error when browsing, but “python mysite.fcgi” from SSH works fine?

If I browse to my site, I get a 500 "internal server error." However, if I SSH into my server and go to my site's folder and run "python mysite.fcgi" I see the HTML rendered fine. Obviously, ...
43
votes
8answers
110k 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 ...
4
votes
3answers
8k views

ubuntu + nginx + uwsgi + django No Python application found

I am trying to setup my server with a nginx to uwsgi to django stack, but I am having problems with the uwsgi part. When I run uwsgi and pass in all the parameters on the command line, it works ...
2
votes
1answer
60 views

How can I install libmemcached on Openshift with sasl support?

I need libmemcached with sasl support to use Memcached Cloud cartridge on Openshift Online. I doing next: 1) Install sasl. curl -LO ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz tar ...
1
vote
1answer
27 views

NGINX: Prevent users from viewing website on port (example.com:5000)

I've setup an ubuntu VPS, which is running a django app. I'm using waitress as a WSGI server and whitenoise to serve static files. Also nginx serves the media folder. The current setup works great at ...
0
votes
0answers
334 views

python django venv ImportError: No module named site

I have tried to deploy a django application using apache webserver. I have enabled wsgi_module in apache. Now i have created a virtual environment and installed django in it. Also installed required ...
0
votes
0answers
152 views

Nginx 502 Bad Gateway

Server X and Server Y are two virtual machines in different locations running with the same specs: Ubuntu 14.04.3 LTS 64-bit 8 CPU cores 12 Gb RAM They are both running the same Django application ...
0
votes
4answers
760 views

502 error after adding module to a Django project running on nginx and gunicorn

I am trying to add a module to an existing Django project, but once I have done it I get a 502 error. The server is running Ubuntu. I don't think it has to do with the applications code because I got ...
0
votes
1answer
352 views

nginx - 502 Bad Gateway ubuntu 14.04 aws ec2 django project + gunicorn

I'm trying to get my django project up and running on an aws ec2 instance. I'm using gunicorn with nginx, and I'm not really sure how I can tackle this problem. I've spent a couple hours on it ...
1
vote
0answers
42 views

Supervisor doesn't run gunicorn with django

I want to run supervisor in my Django server with gunicorn and Nginx, but when I run "supervisord" the supervisor log says: 2015-11-06 23:23:36,746 INFO daemonizing the supervisord process 2015-11-06 ...
0
votes
1answer
59 views

installing local readthedocs with uwsgi

I'm trying to setup a local instance of readthedocs for managing project documentation. I believe I've got everything installed properly with readthedocs and it's dependencies in its own virtualenv, ...
2
votes
1answer
362 views

why django project failed deploying? - django + nginx + uwsgi

I am trying to deploy a Django project through Nginx and uWSGI. If I run the project manually running python manage.py runserver :8000 it works fine, so the project itself is not the problem I guess. ...