uwsgi:无法识别的选项'--https'

Hao*_*ang 6 django https uwsgi

我在AWS上使用uwsgi 2.0.8.我按照http://uwsgi-docs.readthedocs.org/en/latest/HTTPS.html上的说明启动了我的网络应用程序.

uwsgi --master --https 0.0.0.0:8443,foobar.crt,foobar.key
Run Code Online (Sandbox Code Playgroud)

但是,它报告了这个错误:uwsgi: unrecognized option '--https'.

有人帮吗?

PS:我也在我自己的MBP上安装了uwsgi 2.0.8,它运行良好--https.

小智 6

以下是我解决相同问题的方法:

  1. pip卸载uwsgi
  2. sudo apt-get install libssl-dev
  3. (假设我在 /mnt/server) git clone https://github.com/unbit/uwsgi.git
  4. cd uwsgi
  5. python uwsgiconfig.py --build
  6. (让我们测试一下) sudo /mnt/server/uwsgi/uwsgi --master --https 0.0.0.0:443,foobar.crt,foobar.key,HIGH,ca.crt --chdir /mnt/server/mysite --模块 mysite.wsgi