Questions tagged [django]

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 interface, Django is the most popular of the Python web frameworks.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
2k 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 ...
4 votes
0 answers
2k 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 ...
2 votes
4 answers
5k views

Deploying django under a sub-URL with Nginx/Fastcgi

I can't for the life of me figure out how to deploy a django site under a non-root location with Nginx/fastcgi, e.g. localhost:8080/myproject/ instead of localhost:8080/; all the examples I have seen ...
1 vote
2 answers
790 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
0 answers
190 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 ...
0 votes
1 answer
1k views

Django -- test server running in background... somewhere

Using Putty on my Vista machine, I logged into my development server (Ubuntu) and fired up the Django Test server. I left my computer for a while (physically) and returned to find the Putty connection ...
2 votes
0 answers
347 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.. ...
2 votes
1 answer
4k 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. www.mysite....
0 votes
2 answers
287 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
0 answers
985 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
2 answers
4k 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 ...
2 votes
1 answer
4k 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 ...
2 votes
1 answer
2k views

How to run multiple websites from one Django project on nginx and uwsgi

How to run two web sites or subdomains of a site from a single Django code base. Each Django app in the project can then power a website on a different domain, but all the apps can still share a ...
0 votes
1 answer
2k 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' % filefield.url....
1 vote
2 answers
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 ...
2 votes
3 answers
2k 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
1 answer
1k 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
1 answer
5k 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. However,...
1 vote
0 answers
1k 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
1 answer
198 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
2 answers
983 views

static files in OpenShift/Python27/Django in custom build

I have extensively searched for a solution to my problem; however, due to the lack of success I decided to post a question. In short: I have created an OpenShift app/build based on this repo (in ...
0 votes
1 answer
261 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 ...
2 votes
1 answer
1k views

whoosh_backend module cannot be found

I recently tried to install haystack with a whoosh search engine. This is to work with django 1.3 on a nginx production server. I've followed the installation instructions for each item (both haystack ...
2 votes
1 answer
821 views

Unable to serve Django static files

I am trying to serve Django admin static files but nothing seems to be working below is my nginx configuration : upstream django { server 127.0.0.1:8000; } server { listen 4321; ...
0 votes
1 answer
1k 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: http://projects.unbit.it/...
0 votes
1 answer
387 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
2 answers
252 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
1 answer
536 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 ...
3 votes
2 answers
6k 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> <master>true&...
1 vote
0 answers
326 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 ...
2 votes
1 answer
112 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
2 answers
711 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
1 answer
405 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 ...
1 vote
1 answer
457 views

Is it possible to deploy elasticsearch in Webfaction?

I'd like to deploy elasticsearch (ES) at Webfaction server. I have 256MB of memory and running a Django app that takes about 100MB. I need to index about 10,000 records. Is it possible to run ES in a ...
0 votes
1 answer
265 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 people....
0 votes
4 answers
3k views

Apache taking ownership of file and folder

I have django site running on Ubuntu with apache2 configured with mod_wsgi. The media (folder where user uploaded files go) is owned by ubuntu user (with sudo access) and the group of media folder is ...
1 vote
2 answers
688 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: ...
5 votes
1 answer
7k 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 ...
1 vote
2 answers
5k views

Preserve http headers from Django using NGINX and Gunicorn

I'm setting some non-caching headers in a Django middleware to control caching of xhr request. Mostly because IE is caching ajax request heavily. class NeverCacheXhrMiddleware(object): """ ...
2 votes
1 answer
3k views

Django - cant connect to local MySQL Server through socket

I’m using Django Bitnami Stack on Amazon EC2. I’m attempting to sync the database for the initial setup but I am having problems. When running the following command I receive an error message: ...
4 votes
2 answers
3k views

What is the advantage of having ELB infront of your NGINX servers?

I've looked into a lot of back end setups on Amazon Web Services, especially that of Instagram's. On their Instgram Engineering Blog they mentioned how they have an Elastic Load Balancer in front of ...
0 votes
1 answer
938 views

nginx proxy_cache or Memcached

I currently use nginx's proxy_cache for file-based caching in front of three Django applications (Apache/mod_wsgi). For some locations/URLs, I disabled proxy_cache and used Memcached (per view) within ...
0 votes
1 answer
2k views

centos 6.4 - django deploy with apache and mod_wsgi

I'm trying to deploy on a VM with centos 6.4 a basic django project with apache and mod_wsgi. This is the project tree: myproj/ ├── manage.py ├── myapp │   ├── __init__.py │   ├── models.py │   ├── ...
2 votes
0 answers
11k views

Nginx/uWSGI - upstream prematurely closed connection while reading response header from upstream

I've got an Ubuntu server configured with Nginx and uWSGI to serve Django which was setup and working with the default start page yesterday. All I have done since is install MySQL and later ...
2 votes
2 answers
1k views

Installing Pootle with uwsgi on ubuntu server

I'm trying to install a Pootle server on an ubuntu server under uwsgi. While everything went ok on my local dev server, when online i got this error i cannot overcome. It seems application-related, ...
0 votes
1 answer
2k views

Troubleshooting mod-wsgi thread dying

A WSGI daemon on our public-facing web server died and required reloading apache configuration to start it again. All the error.log says is: Script timed out before returning headers: wsgi.py (and ...
1 vote
3 answers
2k views

How do I upgrade django on ubuntu 9.04?

I've got Django 1.0.2 installed on Ubuntu 9.04. I'd like to upgrade Django, because I have an app that needs Django 1.1 or greater. I tried using pip to do the upgrade, but got the following: $ sudo ...
0 votes
1 answer
449 views

Upgrading from Django 1.3 (Python 2.6) to Django 1.5 + Python 2.7 CentOS

We currently have a server running python2.6 + apache and mod_wsgi that runs with Django 1.3. I plan to use the following guide to install python 2.7 http://toomuchdata.com/2012/06/25/how-to-install-...
21 votes
6 answers
54k views

Why is Nginx more popular than lighttpd?

I'd like to use Lighttpd in production for serving Django apps but i see that these days Nginx is more and more popular. Why is that? I'm aware that in the past Lighttpd had memory leaks but isn't ...
4 votes
3 answers
3k views

Scheduling tasks with Django

I have a Django website, and I want to have a certain piece of Python code run at regular intervals. What would be a good way to do that? I know I can cron, but I would prefer the solution to be ...

1
12 13
14
15 16
21