Fixed ssl support. Added env. var. HTTPS_ON.