BTW, at this point probably suggest you create a fresh TG instance and
implement very simple hello world by following:

  http://docs.turbogears.org/1.0/GettingStarted/Controller

Mount this at suburl like before and see if that responds to requests
at correct URLs.

In other words, take your specific application out of the picture and
ensure that TG doing correct thing for simple application.

Graham

On Sep 10, 12:04 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> Wasn't expecting you to replace all existing contents of WSGI script
> file, but merge that with what you had before, as it was wrapping the
> TG application.
>
> Anyway, doesn't matter as it shows that SCRIPT_NAME and PATH_INFO are
> what I would expect.
>
> Thus, looks to definitely be something happening in TG.
>
> Graham
>
> On Sep 10, 11:51 am, AZMel <[EMAIL PROTECTED]> wrote:
>
> > On Sep 9, 6:34 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> > wrote:
>
> > > On Sep 10, 11:18 am, AZMel <[EMAIL PROTECTED]> wrote:
>
> > > > > Stupid question, but do you have any residual mod_rewrite rules in
> > > > > your Apache configuration somewhere pertaining to when you were trying
> > > > > to host TG behind Apache?
>
> > > > > Graham
>
> > > > None.  I had them in a separate file and removed them using
> > > > a2dissite.  I actually thought of that too.
>
> > > > Just in case I am completely reinstalling TG 1.0.5 to see what
> > > > happens.  Not sure of the fix for 1.0.6 is causing my trouble.  Always
> > > > worth a shot.
>
> > > To be absolutely sure, use first recipe in section:
>
> > >  http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Re...
>
> > > Namely:
>
> > > import pprint
>
> > > class LoggingMiddleware:
>
> > >     def __init__(self, application):
> > >         self.__application = application
>
> > >     def __call__(self, environ, start_response):
> > >         errors = environ['wsgi.errors']
> > >         pprint.pprint(('REQUEST', environ), stream=errors)
>
> > >         def _start_response(status, headers):
> > >             pprint.pprint(('RESPONSE', status, headers),
> > > stream=errors)
> > >             return start_response(status, headers)
>
> > >         return self.__application(environ, _start_response)
>
> > > def application(environ, start_response):
> > >     environ['SCRIPT_NAME'] = ''
> > >     return cherrypy._cpwsgi.wsgiApp(environ, start_response)
>
> > > application = LoggingMiddleware(application)
>
> > > Find the request headers from Apache error log and post so can
> > > evaluate whether something is still playing with request information
> > > before it gets to WSGI application.
>
> > > Graham
>
> > I replaced my webapps.wsgi with the code you sent.  Here is the
> > output:
>
> > [Tue Sep 09 18:44:03 2008] [info] [client 192.168.1.121] mod_wsgi
> > (pid=15222, process='', application='localhost|/webapps'): Loading
> > WSGI script '/usr/local/turbogears/myclient/apache/webapps.wsgi'.
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] ('REQUEST',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > {'DOCUMENT_ROOT': '/var/www/',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'GATEWAY_INTERFACE': 'CGI/1.1',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/
> > html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_CONNECTION': 'keep-alive',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_COOKIE': 'tg-visit=3381e270c24faccf8f0ba97f1f33126483c85a2d',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_HOST': '192.168.1.9',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_KEEP_ALIVE': '300',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:
> > 1.8.1.16) Gecko/20080702 Firefox/2.0.0.16',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   'PATH': '/
> > usr/local/bin:/usr/bin:/bin',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'PATH_INFO': '/',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'PATH_TRANSLATED': '/var/www/',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'QUERY_STRING': '',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'REMOTE_ADDR': '192.168.1.121',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'REMOTE_PORT': '1354',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'REQUEST_METHOD': 'GET',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'REQUEST_URI': '/webapps/',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SCRIPT_FILENAME': '/usr/local/turbogears/myclient/apache/
> > webapps.wsgi',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SCRIPT_NAME': '/webapps',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_ADDR': '192.168.1.9',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_ADMIN': '[EMAIL PROTECTED]',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_NAME': '192.168.1.9',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_PORT': '80',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_PROTOCOL': 'HTTP/1.1',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_SIGNATURE': '<address>Apache/2.2.4 (Ubuntu) mod_python/3.3.1
> > Python/2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/
> > 0.9.8e mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8 Server at 192.168.1.9
> > Port 80</address>\\n',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'SERVER_SOFTWARE': 'Apache/2.2.4 (Ubuntu) mod_python/3.3.1 Python/
> > 2.5.1 PHP/5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8e
> > mod_wsgi/2.0 mod_perl/2.0.2 Perl/v5.8.8',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.application_group': 'localhost|/webapps',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.callable_object': 'application',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.listener_host': '',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.listener_port': '80',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.process_group': '',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.reload_mechanism': '0',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'mod_wsgi.script_reloading': '1',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.errors': <mod_wsgi.Log object at 0x8359680>,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter
> > object at 0x83f3a40>,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.input': <mod_wsgi.Input object at 0x8403688>,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.multiprocess': True,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.multithread': False,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.run_once': False,
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.url_scheme': 'http',
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]
> > 'wsgi.version': (1, 0)})
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] mod_wsgi
> > (pid=15222): Exception occurred processing WSGI script '/usr/local/
> > turbogears/myclient/apache/webapps.wsgi'.
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] Traceback
> > (most recent call last):
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   File "/usr/
> > local/turbogears/myclient/apache/webapps.wsgi", line 17, in __call__
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]     return
> > self.__application(environ, _start_response)
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]   File "/usr/
> > local/turbogears/myclient/apache/webapps.wsgi", line 21, in
> > application
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121]     return
> > cherrypy._cpwsgi.wsgiApp(environ, start_response)
> > [Tue Sep 09 18:44:03 2008] [error] [client 192.168.1.121] NameError:
> > global name 'cherrypy' is not defined
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to