Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mod_wsgi not found for apache/windows

My apache can't locate mod_wsgi on windows. I'm using apache 2.2 and the server starts correctly with the default httpd.conf.

I placed mod_wsgi.so into apache's modules directory (C:\Program Files\Apache Software Foundation\Apache2.2\modules) with read/execute permission for all users. I added the following line to the default httpd.conf

LoadModule wsgi_module modules/mod_wsgi.so

And i get this error when trying to start apache. Anyone have any ideas/suggestions?

httpd.exe: Syntax error on line 129 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_wsgi.so into server: The specified module could not be found.

[Tue Nov 23 17:41:55 2010] [warn] (OS 995)The I/O operation has been aborted because of either a thread exit or an application request. : winnt_accept: Asynchronous AcceptEx failed.

[Tue Nov 23 17:41:56 2010] [notice] Child 7384: Released the start mutex

like image 235
kefeizhou Avatar asked Dec 12 '22 18:12

kefeizhou


2 Answers

What is the exact name of the mod_wsgi module file that you stuck in modules directory. Did you rename it from what was downloaded? Did you ensure you didn't stick an extra .so in the name so as to get mod_wsgi.so.so? Windows may be hiding one of the extensions if you did do that.

like image 103
Graham Dumpleton Avatar answered Dec 21 '22 14:12

Graham Dumpleton


Another possibility is that Apache 2.2 is installed as 32-bit while Python was installed as 64-bit on a 64-bit machine. I had a situation where anything python mod_wsgi and legacy mod_python apps were erroring. If you are running 32-bit Apache it only likes to find 32-bit Python no matter the version.

like image 31
Ryan Christensen Avatar answered Dec 21 '22 14:12

Ryan Christensen