0

I have a basic cgi script that I would to be called from mod_wsgi. I have already set up a basic hello world example on mod_wsgi. How do I set my cgi script on mod_wsgi?

I understand that there's an application entrance point called "application", but how do I get my script to run from here?

def application(environ, start_response):
    status = '200 OK'
    output = 'Hello World!'

    response_headers = [('Content-type', 'text/plain'),
    ('Content-Length', str(len(output)))]
    start_response(status, response_headers)

    return [output]

My cgi-script contains lots of imports, loose code, definitions, and print statements.

4

1 に答える 1