Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > simples setup for an wsgi https server in python

Reply
Thread Tools

simples setup for an wsgi https server in python

 
 
Gelonida
Guest
Posts: n/a
 
      07-10-2010
Hi,

I'd like to debug a small wsgi module.

I run it either on an apache web server

or locally via wsgiref.simple_server.make_server
and following code snippet:

from wsgiref.simple_server import make_server
httpd = make_server('localhost',8012,application)
while True:
httpd.handle_request()
print_some_debug_info()



It seems, that wsgiref.simple_server.make_server can only create an http
server.

What I wondered would be how to easiest create an https server, that
supports wsgi modules


TIA




 
Reply With Quote
 
 
 
 
Jean-Paul Calderone
Guest
Posts: n/a
 
      07-10-2010
On Jul 10, 2:42*pm, Gelonida <(E-Mail Removed)> wrote:
> Hi,
>
> I'd like to debug a small wsgi module.
>
> I run it either on an apache web server
>
> or locally via wsgiref.simple_server.make_server
> and following code snippet:
>
> from wsgiref.simple_server import make_server
> httpd = make_server('localhost',8012,application)
> while True:
> * *httpd.handle_request()
> * *print_some_debug_info()
>
> It seems, that wsgiref.simple_server.make_server can only create an http
> server.
>
> What I wondered would be how to easiest create an https server, that
> supports wsgi modules
>
> TIA


You could do this with Twisted:

twistd -n web --https 443 --certificate server.pem --privkey
server.key --wsgi your.application

Jean-Paul
 
Reply With Quote
 
 
 
 
Дамјан Георгиевски
Guest
Posts: n/a
 
      07-13-2010
> It seems, that wsgiref.simple_server.make_server can only create an
> http server.
>
> What I wondered would be how to easiest create an https server, that
> supports wsgi modules


PythonPaste has a WSGI server that supports https
http://pythonpaste.org/modules/https...ste.httpserver

Werkzeug too
http://werkzeug.pocoo.org/documentat...rving.html#ssl


I'd strongly suggest you to have both of those libraries installed, they
have a lot of WSGI goodies

--
дамјан ((( http://damjan.softver.org.mk/ )))

Scarlett Johansson: You always see the glass half-empty.
Woody Allen: No. I see the glass half-full... but of poison.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
simplest way to create simple standalone wsgi server without importwsgi_lib.server Gelonida Python 4 02-01-2011 11:30 PM
Simples! Lester Lane HTML 6 12-16-2009 09:47 PM
server side redirect https => https NOT working Axel ASP General 8 04-27-2009 02:02 AM
WSGI-server in the standard distro? Thomas W Python 0 08-07-2005 04:11 PM
Simples examples for standard libraries Samir Patel Python 0 09-12-2003 08:53 PM



Advertisments