I have a Django application which I am able to run successfully from my development server. I would like to deploy it to Apache web server. The following is my development and deployment setup:
Windows 7
Python 2.7.8
Django 1.6
mod_wsgi 3.5
Apache 2.4
After going through the steps given in the Django documentation, I configured my Apache accordingly and tried running the application, but I get a 'Bad Request' error. The following is the configuration in my httpd.conf file for the Django and WSGI settings:
WSGIScriptAlias / C:/RAKESH/projects/dias/dias/wsgi.py
WSGIPythonPath C:/RAKESH/projects/dias
<Directory C:/RAKESH/projects/dias/dias>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
The following is the contents of wsgi.py file in my project:
import os
import sys
sys.path.append('C:/RAKESH/projects/dias')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dias.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
I don't see any error in my error.log file of Apache, but the following warning lines were present:
[Mon Dec 22 20:34:48.012626 2014] [:warn] [pid 3868:tid 352] mod_wsgi: Compiled for Python/2.7.6.
[Mon Dec 22 20:34:48.012626 2014] [:warn] [pid 3868:tid 352] mod_wsgi: Runtime using Python/2.7.8.
Is there anything else I am missing here? I tried following suggestions in this thread, this thread but it didn't solve the problem. Can anyone please help me solve this problem?
Thanks, Rakesh.