我下载了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 modules / 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>
请帮帮忙?
关于加载规则已解决好问题。它应该是
LoadModule wsgi_module modules / mod_wsgi.so
但在浏览器方面,我一直看到“
Waiting for http://<server>:<port>
“我正在运行Apache?我在哪里可以看到Apache日志或浏览器等待这么长时间的原因?
答案 0 :(得分:2)
您不能将mod_wsgi 3.3与Apache 2.4一起使用。从mod_wsgi源代码库的mod_wsgi 3.X分支获取mod_wsgi源代码。