简体   繁体   English

Jython&Bottle:支持SSL的Web服务器

[英]Jython & Bottle : SSL-enabled web server

I have a web application (webservices) that combine Bottle web framework and Jython ... managed to run it on several web servers as supported on Bottle Documentation and all work fine. 我有一个结合了Bottle Web框架和Jython的Web应用程序(webservices)...设法在Bottle Documentation所支持的多个Web服务器上运行它,并且一切正常。 (such as Paste, Cherrypy, ..etc) (例如Paste,Cherrypy,.. etc)

but, when i try to enable SSL on the web server .. all fails ! 但是,当我尝试在Web服务器上启用SSL时。全部失败! and seems that cause they use pyOpenSSL wrapper for that which is not compatible with Jython. 似乎导致他们将pyOpenSSL包装器用于与Jython不兼容的包装器。

Is there a pyOpenSSL wrapper for Jython? Jython是否有pyOpenSSL包装器? or Is there any available web server that can be combined with Jython and Bottle frame work and can support SSL? 或是否有任何可与Jython和Bottle框架结合使用并支持SSL的Web服务器?

After a quick look I didn't see a pyOpenSSL wrapper for Jython. 快速浏览后,我没有看到Jython的pyOpenSSL包装器。 You could proxy your app thru a webserver such as apache or nginx and have that manage your SSL. 您可以通过网络服务器(例如apache或nginx)代理您的应用程序,并由该服务器来管理SSL。 I have nginx handle my SSL for my cherrypy app. 我让Nginx处理我的Cherrypy应用程序的SSL。

#nginx.conf

server
{
   listen 443 default_server ssl;
   ssl_certificate      /etc/ssl/mydomain.crt ;
   ssl_certificate_key  /etc/ssl/myserver.key;

   #  etc
}

http://wiki.nginx.org/HttpSslModule http://wiki.nginx.org/HttpSslModule

hope this helps. 希望这可以帮助。

Andrew 安德鲁

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM