如何解决Windows上的wsgi_module找不到错误?

时间:2018-12-10 07:32:05

标签: python django apache mod-wsgi

正确安装了pip mod_wsgi 后,将其与配置相关的内容插入到 http.conf(Apache)。 wsgi_module已成功加载,如以下日志中所示:

  

[2018年12月10日星期一10:39:39.048697] [wsgi:info] [pid 16708:tid 692] mod_wsgi(pid = 16708):Python home c:/ users / ... / appdata / local / programs / python / python37。

     

[2018年12月10日星期一10:39:39.048697] [wsgi:info] [pid 16708:tid 692] mod_wsgi(pid = 16708):正在初始化Python。

     

[2018年12月10日星期一10:39:39.081683] [wsgi:info] [pid 16708:tid 692] mod_wsgi(pid = 16708):附加解释器''。

     

[2018年12月10日星期一10:39:39.084682] [wsgi:info] [pid 16708:tid 692] mod_wsgi(pid = 16708):添加'E:/ projects / python /。 ..”到路径。

     

[2018年12月10日星期一10:39:39.089662] [wsgi:info] [pid 16708:tid 692] mod_wsgi(pid = 16708):导入了'mod_wsgi'。

但是在apache模块中,wsgi_module表示无模块文件,如下图所示:

enter image description here

当我单击 wsgi_module 时,将显示以下输出:

  

其中有“ LoadModule wsgi_module modules / mod_wsgi.so”行   httpd.conf文件,但其中没有“ mod_wsgi.so”文件   apachex.y.z / modules /目录。

与mod_wsgi关联的是我的http.conf行:

LoadFile "c:/users/.../appdata/local/programs/python/python37/python37.dll"
LoadModule wsgi_module "c:/users/.../appdata/local/programs/python/python37/lib/site-packages/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd"
WSGIPythonHome "c:/users/.../appdata/local/programs/python/python37"
WSGIPythonPath "E:/projects/python/..."
WSGIScriptAlias /scripts "E:/projects/python/.../.../wsgi.py"

DocumentRoot "E:\\projects\\python\\...\\...\\..."
<Directory "E:\\projects\\python\\...\\...\\...">
    <Files wsgi.py>
        Allow From all
    </Files>
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options +Indexes +FollowSymLinks +Multiviews +ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all
    Allow From all

    #
    # Controls who can get stuff from this server.
    #
    #   onlineoffline tag - don't remove
    Require local
</Directory>

0 个答案:

没有答案