Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uwsgi: unrecognized option '--https'

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.

like image 616
Haoliang Avatar asked Dec 05 '14 03:12

Haoliang


3 Answers

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
like image 94
user3750468 Avatar answered Nov 13 '22 18:11

user3750468


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.

like image 1
Ankit Adlakha Avatar answered Nov 13 '22 20:11

Ankit Adlakha


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.

like image 1
azyth Avatar answered Nov 13 '22 20:11

azyth