我試圖將我的項目從開發服務器移動到Apache服務器。如果嘗試加載mod_wsgi,Apache服務器不會啓動
我在Windows 8.1 x64的機器上運行和Python 2.7
我安裝了Apache 2.2.25 x86和一切正常,服務器處於活動狀態;然後我下載了預編譯的mod_wsgi-3.4.ap22.win32-py2.7(x86版本以匹配Apache的版本)。
我將mod_wsgi.so移動到Apache安裝的modules文件夾中,並在httpd config中添加了這一行:LoadModule wsgi_module modules/mod_wsgi.so
;然後,當我試圖重新啓動失敗離開這個錯誤日誌服務器:
[Fri Jan 10 18:53:18 2014] [notice] Parent: Received restart signal -- Restarting the server.
[Fri Jan 10 18:53:18 2014] [notice] Child 9772: Exit event signaled. Child process is ending.
httpd.exe: Syntax error on line 130 of C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/httpd.conf: Cannot load C:/Program Files (x86)/Apache Software Foundation/Apache2.2/modules/mod_wsgi.so into server: **Impossible to find the specified module**
[Fri Jan 10 18:53:18 2014] [warn] (OS 995)**I/O operation terminated because of the thread's exit or the application's request.** : winnt_accept: Asynchronous AcceptEx failed.
[Fri Jan 10 18:53:19 2014] [notice] Child 9772: Released the start mutex
[Fri Jan 10 18:53:20 2014] [notice] Child 9772: All worker threads have exited.
[Fri Jan 10 18:53:20 2014] [notice] Child 9772: Child process is exiting
注:加粗(**)的部分,其中在我的母語,我只是翻譯它們。
我確定該模塊實際上被稱爲mod_wsgi.so
,所以我不能真正看到問題出在哪裏。
編輯:發現問題。 Python(以及因此MySQL pyton mod)是x64而不是x86。安裝了正確的版本,它工作得很好。