how to build uWSGI with SSL support to use the websocket handshake API function? how to build uWSGI with SSL support to use the websocket handshake API function? nginx nginx

how to build uWSGI with SSL support to use the websocket handshake API function?


I had to install OpenSSL via brew. Then run this command.

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


As one of the poster's below mentioned, you'll need the openssl headers, and if they're in a non-traditional place (for example on Mac OS-X) you have to let uWSGI know.

On Debian/Ubuntu install them with "apt-get install libssl-dev". They'll go in /usr/include/" which is part of UWSGI's automatic path. You should be done.

Mac OS-X El Capitan (10.11) removed the openssl headers. You can check common places with this command--they may have been installed by a package manager like brew or macports.

find /usr/local/include /usr/include /opt/local/include /usr/local/ssl/include -name openssl -type d 2> /dev/null

If that command returns nothing, you'll need to install the headers. You can install them with MacPorts (port install openssl) which will put them in /opt/local/include with a link in /usr/local/include. You can also install them directly, by downloading and untarballing openssl, running "./Configure darwin64-x86_64-cc", then "make", and finally "sudo make install".

Xcode's build utilities package a whole pre-defined build environment. With XCode projects that means developers have a common base to work from, and anything not in the base must be in XCode project. Building open source projects outside the base, gets a bit messy because dependencies like openssl live outside the base directories. You can give uwsgi's build chain ONE include directory to use. It doesn't support the PATH style : separator.

In most install cases, the following should work on OpenSSL.

UWSGI_INCLUDES=/usr/local/include/ pip install uwsgi  


just install openssl development headers (libssl-dev) and rebuild uwsgi (its build system will automatically detect ssl availability)