8

I'm using uwsgi 2.0.8 on AWS. I followed the instructions on http://uwsgi-docs.readthedocs.org/en/latest/HTTPS.html to start my web app.

uwsgi --master --https 0.0.0.0:8443,foobar.crt,foobar.key

However, it reports this error: uwsgi: unrecognized option '--https'.

Anyone helps?

PS: I also installed uwsgi 2.0.8 on my own MBP, it works well with --https.

Haoliang
  • 1,047
  • 3
  • 12
  • 14
  • I find the solution. Just because I installed `uwsgi` without ssl support. I installed `libssl-dev` and rebuilt `uwsgi` again, it works finally. – Haoliang Dec 05 '14 at 03:40
  • Does this answer your question? [how to build uWSGI with SSL support to use the websocket handshake API function?](https://stackoverflow.com/questions/24183053/how-to-build-uwsgi-with-ssl-support-to-use-the-websocket-handshake-api-function) – rzlvmp Apr 07 '22 at 04:08

3 Answers3

7

Below are how I solved the same issue:

  1. pip uninstall uwsgi
  2. sudo apt-get install libssl-dev
  3. (Assume I am at /mnt/server) git clone https://github.com/unbit/uwsgi.git
  4. cd uwsgi
  5. python uwsgiconfig.py --build
  6. (Let us test) 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
user3750468
  • 71
  • 1
  • 2
1

Try installing uwsgi with below mentioned command on mac:

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

And if you are trying on Centos, then make sure openssl and openssl-devel package is installed.

Ankit Adlakha
  • 1,436
  • 12
  • 15
1

I was on a limited RedHat 7.7 instance and libssl-dev was unavailable to me, I was able to use openssl-devel instead.

Note: I also needed to update iptables to open port 8443 since my instance was pretty locked down

uwsgi --master --https 0.0.0.0:8443,foobar.crt,foobar.key then works as expected.

Brad Solomon
  • 38,521
  • 31
  • 149
  • 235
azyth
  • 698
  • 5
  • 19