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

时间:2014-12-05 03:31:47

标签: 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

但是,它会报告此错误:uwsgi: unrecognized option '--https'

有人帮忙吗?

PS:我也在自己的MBP上安装了uwsgi 2.0.8,它与--https配合得很好。

3 个答案:

答案 0 :(得分:4)

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

  1. pip uninstall 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 --module mysite.wsgi

答案 1 :(得分:1)

我使用的是RedHat 7.7受限实例,但是libssl-dev对我不可用,因此我可以使用openssl-devel

注意:由于实例已被锁定,我还需要更新iptables以打开端口8443

uwsgi --master --https 0.0.0.0:8443,foobar.crt,foobar.key然后将按预期工作。

答案 2 :(得分:0)

尝试在Mac上使用以下提到的命令安装uwsgi:

CFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" UWSGI_PROFILE_OVERRIDE=ssl=true pip install uwsgi -Iv

如果您尝试使用Centos,请确保已安装openssl和openssl-devel软件包。

相关问题