簡體   English   中英

在Windows 64位上將mod_wsgi模塊加載到apache的問題

[英]Problem of loading mod_wsgi module into apache on Windows 64-bit

我正在嘗試按照此指令安裝mod_wsgi模塊。 我從這個來源下載了mod_wsgi.so。 似乎apache無法正常重啟服務,並且在將以下行添加到httpd.conf后無法加載頁面

LoadModule wsgi_module modules/mod_wsgi.so

我從一些來源檢查了一些問題如下:

  1. 文件名是正確的 - mod_wsgi.so不是mod_wsgi.so.so
  2. 文件的權限設置與正確加載的其他模塊相同
  3. 為所有用戶安裝了Python

環境:

  • WindowsServer®標准FE 64位
  • WAMP 2.0上的Apache 2.2.8
  • 為所有用戶安裝了Python 2.7.1

在不加載此模塊的情況下,apache正常運行。 我的問題是什么?

應用程序error.log:

[Mon May 23 10:12:20 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon May 23 10:12:20 2011] [notice] Child 4528: Exit event signaled. Child process is ending.
[Mon May 23 10:12:21 2011] [notice] Child 4528: Released the start mutex
[Mon May 23 10:12:22 2011] [notice] Child 4528: All worker threads have exited.
[Mon May 23 10:12:27 2011] [notice] Child 4528: Child process is exiting
[Mon May 23 10:12:28 2011] [notice] Parent: Child process exited successfully.
[Mon May 23 10:13:46 2011] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Mon May 23 10:13:46 2011] [notice] Server built: Jan 18 2008 00:37:19
[Mon May 23 10:13:46 2011] [notice] Parent: Created child process 5316
[Mon May 23 10:13:46 2011] [notice] Child 5316: Child process is running
[Mon May 23 10:13:46 2011] [notice] Child 5316: Acquired the start mutex.
[Mon May 23 10:13:46 2011] [notice] Child 5316: Starting 64 worker threads.
[Mon May 23 10:13:46 2011] [notice] Child 5316: Starting thread to listen on port 81.
[Mon May 23 10:14:57 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon May 23 10:14:57 2011] [notice] Child 5316: Exit event signaled. Child process is ending.
[Mon May 23 10:14:58 2011] [notice] Child 5316: Released the start mutex
[Mon May 23 10:14:59 2011] [notice] Child 5316: All worker threads have exited.
[Mon May 23 10:15:04 2011] [notice] Child 5316: Child process is exiting
[Mon May 23 10:15:04 2011] [notice] Parent: Child process exited successfully.

從apache error.log,很清楚安裝的apache是​​32位嗎?

Soulution:將所有內容更改為64位。

我也遇到過這種情況,Apache會在Windows 64bit上運行,但是如果加載mod_wsgi則不會。

我找到了一個非常簡單的解決方案:

  1. 下載並安裝64位版本的Apache,如果從http://wampserver.com/下載並安裝,則可以輕松處理
  2. 從此頁面下載mod_wsgi
  3. 將下載的壓縮文件的內容解壓縮到c:\\wamp\\bin\\apache\\Apache2.2.21\\modules\\
  4. 編輯httpd.conf並添加如下行: LoadModule wsgi_module modules/mod_wsgi.so
  5. 重啟apache,然后繼續你的django開發。

總結:一切(包括apache和mod_wsgi)必須是64位才能在64位窗口上運行Apache / mod_wsgi。

我在Windows 2008服務器上運行Apache / Mod_wsgi。

由Peter提供的64位Apache版本的鏈接已被破壞。 我找到一個適合我的:

http://www.apachelounge.com/download/win64/

閱讀readme.txt。 安裝非常簡單。

他與64位mod_wsgi的鏈接仍然很好:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi

我使用了win-amd64版本就好了,我認為我所使用的硬件是英特爾。

我確保Apache和Mod_wsgi版本與python版本匹配。 我相信我使用的mod_wsgi版本是3.3。

據我所知......

目前,Microsoft Windows不存在官方64位版本的Apache和PHP。

但是,有一個家伙在撰寫本文時至少為我們編譯了Apache 2.2.19 x64 ,你可以在這里下載。

如果你想要一個更新的版本,你必須自己編譯,但這將是一項艱巨的任務!

此外,即使您確實在Windows上運行Apache x64,您打算如何處理mod_wsgi? 這就是為什么我決定為此目的創建一個Arch Linux LAMP堆棧的原因。 我現在工作正常,但由於Aptana不與Django項目同步,我再次研究Windows解決方案。

如果你找到一個好的解決方案,請告訴我!

編輯:我發現這些64位mod_wsgi的py2.6和2.7 ,但我還沒有讓它們工作。

編輯:是的! 我搞定了! 我的Apache服務監視器有一個綠燈,現在說Apache / 2.2.19(Win64)mod_wsgi / 3.3 Python / 2.6.4。 我正在使用2.6.4,因為這是Autodesk Maya正在運行的,我希望保持相同的版本以保持一致性。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM