Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Obviously I was wrong to assume adding a subdomain would be as straightforward as duplicating my existing domain & adding a DNS A record.

So I tried to run cp -r /var/www/ /var/www/ & configure a subdomain from the original domain settings, but now it gives a 'Python application not found' error on my original domain.

I have a VDS running Ubuntu, Nginx and uWSGI to serve Django with the following configuration;

- /conf
-- /nginx.conf
-- /uwsgi.conf
- /logs
- /src
- /venv

Nginx is setup to read configs from /var/www/*/conf/nginx.conf

uWSGI is set to startup with a Daemon and this is my uwsgi.conf;

# variables
projectname = mydomain
projectdomain =
base = /var/www/

# config
plugins = python
master = true
protocol = uwsgi
env = DJANGO_SETTINGS_MODULE=%(projectname).settings
pythonpath = %(base)/src/%(projectname)
module = %(projectname).wsgi
#module = mydomain.wsgi
#module = mydomain.wsgi:application
#socket = /tmp/%(projectdomain).sock
socket =
logto = %(base)/logs/uwsgi.log
# below line runs as a daemon in background
daemonize = /var/log/uwsgi/mydomain.log

And I've pastebined my uwsgi domain log if it helps

I'm still new to uwsgi/nginx (if you hadn't guessed!) so could anyone offer a suggestion for my problem or could I provide some more detail?

share|improve this question
What version of django are you using? – singer Apr 21 '13 at 1:36
@singer I'm using 1.5.1 – marksweb Apr 21 '13 at 16:39

1 Answer 1

up vote 0 down vote accepted

My mistake here was an improperly renamed module in my Django project.

I changed mydomain.mydomain to mydomain.myd so then uWSGI was looking for a module named mydomain.mydomain and then the file instead of mydomain.myd.wsgi which is where it had been.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.