I'm trying to get mod_wsgi to work on debian lenny.

Apache 2.2. is installed and configured.

mod_wsgi is installed and enabled.

I setup a virtual host like this:


<VirtualHost *:80>
        ServerAdmin webmas...@localhost

        ServerName www.mydomain.com

        WSGIScriptAlias /test /home/user/domains/mydomain.com/apache/
test.wsgi

        <Directory  /home/user/domains/mydomain.com/apache>
          Order deny,allow
          Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error,
crit,
        # alert, emerg.
        LogLevel debug

        CustomLog /var/log/apache2/access.log combined

</VirtualHost>



and test.wsgi looks like this:


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]



But when i try to start apache, i get this message:

Starting web server: apache2Syntax error on line 1 of /home/user/
domains/mydomain.com/apache/test.wsgi:
Invalid command 'def', perhaps misspelled or defined by a module not
included in the server configuration
 failed!


What am i doing wrong? Any advice would be much appreciated.

Thanks in advance

--

You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.


Reply via email to