FAQ
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

Search Discussions

  • Jean-Paul Calderone at Jul 10, 2010 at 7:21 pm

    On Jul 10, 2:42?pm, Gelonida 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
  • Дамјан Георгиевски at Jul 13, 2010 at 9:21 am

    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/httpserver.html#module-paste.httpserver

    Werkzeug too
    http://werkzeug.pocoo.org/documentation/0.6.2/serving.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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 10, '10 at 6:42p
activeJul 13, '10 at 9:21a
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase