0

我下载了 mod_wsgi-3.3 代码并成功构建。我成功创建了 mod_wsgi.so 库并将其复制到 Apache 模块文件夹:

modules 1158> ldd mod_wsgi.so
        linux-vdso.so.1 =>  (0x00007ffffe39e000)
        libpython2.7.so.1.0 => lib64/libpython2.7.so.1.0 (0x00002b55279bd000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b5527da2000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00002b5527fbd000)
        libm.so.6 => /lib64/libm.so.6 (0x00002b55281c1000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00002b5528445000)
        libc.so.6 => /lib64/libc.so.6 (0x00002b5528648000)
        libssl.so.6 => /lib64/libssl.so.6 (0x00002b552899f000)
        libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002b5528bec000)
        /lib64/ld-linux-x86-64.so.2 (0x00000039cc400000)
        libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002b5528f3d000)
        libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002b552916b000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002b5529401000)
        libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002b5529603000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00002b5529828000)
        libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002b5529a3d000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002b5529c45000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00002b5529e47000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00002b552a05d000)
        libsepol.so.1 => /lib64/libsepol.so.1 (0x00002b552a275000)

我在 httpd.conf 中添加了以下行

LoadModule python_module 模块/mod_wsgi.so

但我仍然收到以下错误:

apache/bin/bin 1173> apachectl start
httpd: Syntax error on line 147 of prasad/bin/conf/httpd.conf: Can't locate API module structure `mod_wsgi' in file prasad/bin/modules/mod_wsgi.so: prasad/bin/modules/mod_wsgi.so: undefined symbol: mod_wsgi

appache/bin/bin 1174> nm ../modules/mod_wsgi.so | grep mod_wsgi
apache/bin/bin 1175>

请帮忙?

关于加载规则的 OK 问题已解决。它应该是

LoadModule wsgi_module 模块/mod_wsgi.so

但在浏览器方面,我一直看到“

Waiting for http://<server>:<port>

“我正在向哪个 Apache 运行?我在哪里可以看到 Apache 日志或为什么浏览器要等待这么长时间?

4

1 回答 1

2

您不能将 mod_wsgi 3.3 与 Apache 2.4 一起使用。从 mod_wsgi 源代码库的 mod_wsgi 3.X 分支获取 mod_wsgi 源代码。

于 2012-05-17T09:21:51.177 回答