I downloaded mod_wsgi from the following location for apache 2.2 and python 2.7 (64bit). (I’m trying to get django to run on my computer).
Whenever I add the following line:
LoadModule wsgi_module modules/mod_wsgi.so
Apache fails to start up. Can anyone tell me what the issue might be?
These are the following things you need to do to setup Apache for Django. I assume you are using Python 2.7 (32-bit) on Windows (32-bit) with WAMP server (32-bits) installed.
Download mod_wsgi-win32-ap22py27-3.3.so. Or download your respective .so compatible file
Change its name to
mod_wsgi.soand copy it to/Program Files/Apache Software Foundation/Apache22/moduleson Windows.Open
httpd.confusing Admin rights. Now, you will find a list of lines withLoadModule .... Just addLoadModule wsgi_module modules/mod_wsgi.soto that list.Your are partially done.. you can restart the apache and shouldn’t find any errors.
Now you need to link it to your Django project.
In your Django project root folder, add
apachefolder and createdjango.wsgi(don’t change this name) andapache_mydjango.conf.In
httpd.confadd the following line at the bottom of the page.Include "d:/projects/mysite/apache_django_wsgi.conf"Open
django.wsgiand add the following lines:Open
apache_djang_wsgi.confand add:Note:
I am assuming your Django project hierarchy is something like this:
Best tutorial links:
Actually I don’t understand why people are unable to fix it. I’ve seen lots of questions on it here and I even posted few…So, I thought to write a initial setup version directly as answer