mod_wsgi-express:错误:指定了无效命令

man*_*mne 2 apache python-2.7

我试图运行WSGI应用程序(hello.wsgi)上localhost通过apache24mod_wsgi模块,但它显示了这一点:

cd c:/apache24/bin
mod_wsgi-express start-server hello.wsgi
Run Code Online (Sandbox Code Playgroud)
Usage: mod_wsgi-express command [params]

Commands:
    module-config
    module-location

mod_wsgi-express: error: Invalid command was specified.
Run Code Online (Sandbox Code Playgroud)

请帮我!

Gra*_*ton 5

在 Windows 上,该start-server命令不可用。pip install mod_wsgi在 Windows 上使用仅用于mod_wsgi编译模块。编译完成后,运行:

mod_wsgi-express module-config
Run Code Online (Sandbox Code Playgroud)

将输出复制到您的 Apache 配置文件中以使其加载mod_wsgi模块。然后手动配置 Apache 以托管您的特定 WSGI 应用程序。

请参阅“连接到 Apache 安装”部分:

有关module-config命令的更多详细信息。