How to resolve wsgi_module not found error on windows?

霸气de小男生 提交于 2019-12-24 05:52:24

问题


Summary:

After installing the mod_wsgi with pip correctly, and inserted its config related stuff to the http.conf (apache). The wsgi_module was loaded successfully as shown in the log below:

[Mon Dec 10 10:39:39.048697 2018] [wsgi:info] [pid 16708:tid 692] mod_wsgi (pid=16708): Python home c:/users/.../appdata/local/programs/python/python37.

[Mon Dec 10 10:39:39.048697 2018] [wsgi:info] [pid 16708:tid 692] mod_wsgi (pid=16708): Initializing Python.

[Mon Dec 10 10:39:39.081683 2018] [wsgi:info] [pid 16708:tid 692] mod_wsgi (pid=16708): Attach interpreter ''.

[Mon Dec 10 10:39:39.084682 2018] [wsgi:info] [pid 16708:tid 692] mod_wsgi (pid=16708): Adding 'E:/projects/python/...' to path.

[Mon Dec 10 10:39:39.089662 2018] [wsgi:info] [pid 16708:tid 692] mod_wsgi (pid=16708): Imported 'mod_wsgi'.

Question:

But at the apache modules, the wsgi_module says No module file as shown in the picture below:

More detail:

And when I click on the wsgi_module, this output is displayed:

There is 'LoadModule wsgi_module modules/mod_wsgi.so' line in httpd.conf file but there no 'mod_wsgi.so' file in apachex.y.z/modules/ directory.

It is my http.conf lines which are associated with the mod_wsgi:

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>

来源:https://stackoverflow.com/questions/53701228/how-to-resolve-wsgi-module-not-found-error-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!