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

5
votes
2answers
4k views

nginx+django serving static files

I have followed instruction for setting up django with nginx from the django wiki (https://code.djangoproject.com/wiki/DjangoAndNginx) and have nginx setup as follows (a few name changes to fit my ...
14
votes
1answer
3k 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
2k views

How can Django/WSGI and PHP share / on Apache?

I have a server running an established PHP site, as well as some Django apps. Currently, a VirtualHost set up for PHP listens on port 80, and requests to certain directories are proxied to a ...
1
vote
2answers
144 views

django + apache2, each user takes up a lot of memory

I'm running my django app on apache2 (with mpm prefork) with a mysql database. It works fine, except when multiple users use it, and it takes around 40-45m RES for each user. httpd.conf: ...
1
vote
1answer
146 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 ...
0
votes
3answers
275 views

MySQL Not Turning On

I have an amazon ec2 instance running on the Amazon Linux AMI and its a micro instance. I wanted to install Django onto my server so I entered these commands wget ...
18
votes
4answers
17k views

Which is best for Django? Lighttpd or Nginx? Or maybe something else?

Which of Lighttpd and Nginx is, basing on your experience, better suited for Django? I've used both and can hardly notice any difference at all, they just work fine... Are there any use cases when one ...
4
votes
2answers
479 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 ...
4
votes
0answers
2k 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** ...
2
votes
2answers
562 views

Apache mpm worker + wsgi Python/Django workers stuck

Our Apache+Django server has the problem that workers get stuck. It's an mpm worker model, and after some time, each process that serves some dozen worker threads has all its workers frozen: # ...
2
votes
1answer
1k views

Fine tuning Django Apache mod_wsgi

First off I am looking for some help setting up my Django and Apache settings to fine tune it for my site for the best performance cost effectiveness. Server info: Django 1.3 Webfacion server, 80mb ...
2
votes
2answers
887 views

Apache : Map one virtualhost to a subdirectory of another virtualhost

I'm trying to map one virtual host to a subdirectory of another virtual host, something like this http://host2.com -> http://host1.com/host2. At this moment, whenever I go to http://host2.com it ...
2
votes
2answers
625 views

my first “production” debian server configuration

I have been using Debian for a year, mostly as the distro for my internal company server. Now I am making a public e-commerce website and I am planning to use a dedicated Debian server at a datacenter ...
0
votes
4answers
97 views

Trying to use virtualenv Django 1.4.1

I have Django 1.2.1 on the server. I need to use virtually Python to install Django 1.4.1 and an adapter to PostgreSQL which I want. I am trying to set up this software on my server. So I run ...
2
votes
1answer
64 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 ...
2
votes
2answers
352 views

Any way to change the default umask for Apache2?

When Apache writes new files (static content, like writing to the cache file) it creates this file without the proper permissions. There's no write permission for the group by default and this causes ...
2
votes
2answers
1k views

How do I get Apache to run Python 2.7 rather than 2.5?

How do I get Apache to run 2.7 rather than 2.5? I'm configuring Apache to use mod_wsgi with Django and Python 2.7, but error logs show Apache is using Python 2.5.2 and can't find ...
1
vote
0answers
258 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 ...
1
vote
2answers
656 views

Django and WSGI and Apache2— site is perfect in test server, won't load with Apache

OK I don't what I'm doing wrong here. I have a Linode VPS running Ubuntu. I installed Django 1.3, Apache2, and mod-WSGI. I created my (extermely simple) website, slapped in some images, have a CSS ...
1
vote
1answer
398 views

Re: How can Django/WSGI and PHP share / on Apache?

in response to: How can Django/WSGI and PHP share / on Apache? Hello, could you please post the complete config file from /sites-available I am having a problem seems like rewrite engine redirects ...
1
vote
1answer
600 views

How to integrate PHP forum system with new Django website

I'm just about to launch a new Django website (RedHat EL4, Apache 2.0.52, Django 1.1, mod_wsgi), transitioning from a basic static-html and php site. As it's currently configured, Django handles ...
0
votes
0answers
51 views

restart nginx after modifying settings.py and urls.py

In my django project, I modified the files settings.py and urls.py. My web application runs on nginx server. I reloaded the server using the following command: /etc/init.d/nginx reload But the ...
0
votes
1answer
85 views

Redirect with lighttpd and fastcgi on Django App

I have setup my lighttpd in a fashion which redirects all subdomains to my primary domain in following fashion * .domain.com -> domain.com. Unfortunately when i type in a subdomain such as ...
0
votes
0answers
206 views

setup nginx to serve django and wordpress blog as subdirectory

upstream django { server unix:///home/ubuntu/web/www.mysite.com/uwsgi-tutorial/mysite/mysite.sock; # for a file socket } server { listen 80; server_name mysite.com www.mysite.com; ...
0
votes
1answer
102 views

Installing WSGI on EC2 micro instance

How do I install Apache with WSGI on my Amazon AMI EC2 micro instance? I tried sudo yum install httpd libapache2-mod-wsgi but I got this error message no package libapache2-mod-wsgi available ...
0
votes
2answers
4k views

Nginx - when tunnel the url redirects without port number

My problem is very similar to this: nginx proxy pass redirects ignore port I am using nginx 1.0.14. I want to be able to ssh-tunnel into my Django website, so I can work remotely. I've tested a ...
0
votes
1answer
348 views

Scalability problem (Tornado). Can't figure it out, holding up launch

Thanks guys, any ideas/insight are appreciated b/c this is driving me crazy. Problem: Only about 3 or 4 users can use the server simultaneously before app grinds to a halt. Currently we see massive ...
0
votes
1answer
290 views

Lighttpd redirect from www.domain.com to domain.com

I need to permanently redirect all www.domain.com to domain.com in Lighttpd. Here's relevant part of my lighttpd.conf: $HTTP["host"] =~ "^www\.domain\.com$" { url.redirect = ( "^/(.*)" ...
0
votes
1answer
226 views

embed wordpress or other php application to a django/python site?

Is that possible to embed wordpress or other php application to a django/python site ? I am running apache web server on linux... Thanks