I've got both the ESP8266WebServer and the links2004/arduinoWebSockets library included in my project and I wanted to find a way to safely open up access to the device to the internet. I've attached a working nginx SSL reverse proxy configuration file which is tested and working on nginx v1.10.0 and the SSL cert I used is a self generated Let's Encrypt SSL cert which is recognized and accepted by all modern browsers / decent operating systems.
There's also a little video showing it in action here working: https://www.youtube.com/watch?v=pm_68Y3dXwk