Set environment variavle on windows as
MOD_WSGI_APACHE_ROOTDIR = C:\xampp\apachestep 2: open terminal and run following command
pip install mod_wsgi=4.5.20step 3: to get mod_wsgi path , open terminal and run following command and copy the path
mod_wsgi-express module-configstep 4: open this file http.conf and write the following code C:\xampp\apache\http.conf or on wamp :wamp64\bin\apache\apache2.4.39\conf
loadModule wsgi_module "path" WSGIScriptAlias / "d:/dijango_project_location/demo/demo/wsgi.py" WSGIPythonHome "c:/python36" WSGIPythonPath "d:/dijango_project_location/demo/" Alias /media/ d:/dijango_project_location/demo/media Alias /media/ d:/dijango_project_location/demo/static <Directory d:/dijango_project_location/demo/media> Require all granted </Directory> <Directory d:/dijango_project_location/demo/static> Require all granted </Directory> <Directory "d:/dijango_project_location/demo"> <Files wsgi.py> Require all granted </Files> </Directory>step 5: if apper 400 error on localhost, then to go django project /setting.py and change the following line>
DEBUG = True ALLOWED_HOSTS =['127.0.0.1','localhost']
DEBUG = False
Total : 15148
Today :52
Today Visit Country :