Ok ... i think here is the culprit ... which has been troubling me ...
"application" not found in script.... gives an internal server error
'500'

[Thu Oct 21 23:18:43 2010] [notice] Apache/2.2.15 (Unix)
mod_ssl/2.2.15 OpenSSL/0.9.8k DAV/2 mod_wsgi/3.2 Python/2.6.5
configured -- resuming normal operations
[Thu Oct 21 23:18:47 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=1794): Target WSGI script '/home/dev/wsgi-scripts/index.py' does
not contain WSGI application 'application'.
[Thu Oct 21 23:18:47 2010] [error] [client 192.168.1.9] Target WSGI
script not found or unable to stat: /home/dev/wsgi-scripts/favicon.ico
[Thu Oct 21 23:20:13 2010] [error] [client 192.168.1.9] Target WSGI
script not found or unable to stat: /home/dev/wsgi-scripts/favicon.ico
[Thu Oct 21 23:20:19 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=1796): Target WSGI script '/home/dev/wsgi-scripts/index.py' does
not contain WSGI application 'application'.
[Thu Oct 21 23:28:20 2010] [error] [client 192.168.1.9] Target WSGI
script not found or unable to stat: /home/dev/wsgi-scripts/favicon.ico
[Thu Oct 21 23:34:15 2010] [error] [client 192.168.1.9] Target WSGI
script not found or unable to stat: /home/dev/wsgi-scripts/favicon.ico
[Thu Oct 21 23:34:16 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=1797): Target WSGI script '/home/dev/wsgi-scripts/index.py' does
not contain WSGI application 'application'.
[Thu Oct 21 23:34:19 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=1792): Target WSGI script '/home/dev/wsgi-scripts/index.py' does
not contain WSGI application 'application'.
[Thu Oct 21 23:34:28 2010] [error] Exception KeyError:
KeyError(140078841251616,) in <module 'threading' from
'/usr/lib/python2.6/threading.pyc'> ignored
[Thu Oct 21 23:34:28 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=1793): Target WSGI script '/home/dev/wsgi-scripts/index.py' does
not contain WSGI application 'application'.
[Thu Oct 21 23:40:19 2010] [error] [client 192.168.1.9] Target WSGI
script not found or unable to stat: /home/dev/wsgi-scripts/favicon.ico
[Thu Oct 21 23:40:20 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=1793): Target WSGI script '/home/dev/wsgi-scripts/index.py' does
not contain WSGI application 'application'.
[Thu Oct 21 23:40:21 2010] [error] [client 192.168.1.9] mod_wsgi
(pid=1792): Target WSGI script '/home/dev/wsgi-scripts/index.py' does
not contain WSGI application 'application'.
cat: last: No such file or directory

--------------------------------------
#!/usr/bin/env  python

import os
from datetime import datetime
import re

class Handler:
    def do(self, environ, start_response):

       uri = environ['REQUEST_URI']

       html = "<html><head><title>Index of %s</title></head><body>" % uri
       html += "<h1>Index of %s</h1>" % uri
       html += "<table border='0'>"
       html += '<tr><th>Last
Modified</th><th>Size</th>Description</th><th>Webifiable</th><tr><th
colspan="6"><hr></th></tr>
       html += '<tr><td><a href="..">Parent
Directory</a></td><td>&nbsp;</td><td align="right"> -
</td><td>&nbsp;</td><td>&n
       html += '<tr><th colspan="6"><hr></th></tr>'
       html += "</tables>"

       html += "</body></html>"

       output = html
       mimeType = "text/html"

       status = "200 OK"
       response_headers = [("Content-type", mimeType),
                           ("Content-length" , str(len(output)))]

       start_response(status, response_headers)
       return [output]

    def application(environ, start_response):
        handler = Handler()
        return handler.do(environ, start_response)

### Do I REALLY need to use wsgiref ??? Else how do I run 'application' ???

    if __name__ ==  '__main__' :
       ## Handler()  ;;; will this do
       import wsgiref.handlers
       wsgiref.handlers.CGIHandler().run(application)


>>
>> <Directory "/opt/apache2215/htdocs">
>>    Options Indexes FollowSymLinks
>> </Directory>

FollowSymLinks   changed to   MultiViews

TIA

Nitin

-- 
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