simples setup for an wsgi https server in python

Discussion in 'Python' started by Gelonida, Jul 10, 2010.

  1. Gelonida

    Gelonida Guest

    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
     
    Gelonida, Jul 10, 2010
    #1
    1. Advertising

  2. 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
     
    Jean-Paul Calderone, Jul 10, 2010
    #2
    1. Advertising

  3. > 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.
     
    Дамјан ГеоргиевÑки, Jul 13, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samir Patel

    Simples examples for standard libraries

    Samir Patel, Sep 12, 2003, in forum: Python
    Replies:
    0
    Views:
    284
    Samir Patel
    Sep 12, 2003
  2. Chris Shenton
    Replies:
    1
    Views:
    1,463
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Aug 24, 2007
  3. Lester Lane

    Simples!

    Lester Lane, Dec 16, 2009, in forum: HTML
    Replies:
    6
    Views:
    590
    Doug Miller
    Dec 16, 2009
  4. Gelonida
    Replies:
    4
    Views:
    588
    Gelonida
    Feb 1, 2011
  5. Axel
    Replies:
    8
    Views:
    1,180
    Adrienne Boswell
    Apr 27, 2009
Loading...

Share This Page