I create project using Django 1.8. now ,I want deploy it to server.when I run this command in Ubuntu every thing working find.
python manage.py runserver
finally I could successfully deploy my project.I enabled Apache this module early.
refer this link
--------------this is my virtual host file----------------------------------
WSGIPythonPath /home/umayanga/Desktop/view_site/serialKey_gen_site:/home/umayanga/Desktop/view_site/serialKey_gen_site/myvenv/lib/python3.4/site$
<VirtualHost *:80>
ServerAdmin admin@key.com
ServerName key.com
ServerAlias www.key.com
Alias /templates/ /home/umayanga/Desktop/view_site/serialKey_gen_site/templates/
Alias /static/ /home/umayanga/Desktop/view_site/serialKey_gen_site/static/
<Directory "/home/umayanga/Desktop/view_site/serialKey_gen_site/static">
Require all granted
</Directory>
<Directory "/home/umayanga/Desktop/view_site/serialKey_gen_site/templates">
Require all granted
</Directory>
WSGIScriptAlias / /home/umayanga/Desktop/view_site/serialKey_gen_site/mysite/wsgi.py
<Directory "/home/umayanga/Desktop/view_site/serialKey_gen_site/mysite">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
-----------------wsgi.py---------------------------------------
"""
WSGI config for mysite project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
application = get_wsgi_application()
I think this will be help to other Django developers.Thank you all developers those who help me.
As I said in the comments, you're not doing anything to add your project to the PYTHONPATH so that the WSGI app can actually find it.
It seems from your directory structure that you're using a virtualenv; you need to activate that either within the .wsgi file or in the Apache configuration itself. The Django docs recommend the latter.
In your wsgi.py try changing
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
to
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
Since both files are in the same directory/module.