Forgot to say that I've tried test.wsgi instead of gatekeeper.wsgi and
it works (prints "Hello World").


On 20 Abr, 15:42, noisebleed <vitorbrandao...@gmail.com> wrote:
> Hi all. First message sent to modwsgi mailing list.
>
> I've built a small web application with TurboGears2 and tested it
> inside a virtualenv (on my personal machine) with "paster serve
> development.ini". Works just fine.
>
> Then I built an Egg and installed system-wide on my server. Defined a
> new Apache2 vhost and configured both Apache and the wsgi script
> created by modwsgideploy. After some adjustments I'm stuck with the
> message in the email subject. When visiting my URL Apache shows "500
> Internal Server Error".
>
> Here goes an excerpt from Apache error log:
>
> [info] Initial (No.1) HTTPS request received for child 1 (server
> gatekeeper.localhost:443)
> [info] mod_wsgi (pid=21618): Create interpreter 'gatekeeper.localhost:
> 50000|'.
> [info] [client 192.168.1.103] mod_wsgi (pid=21618,
> process='gatekeeper', application='gatekeeper.localhost:50000|'):
> Loading WSGI script '/var/www/modwsgi/gatekeeper/
> gatekeeper.wsgi'.
> [error] 15:54:44,649 DEBUG [pylons.configuration] Initializing
> configuration, package:
> 'gatekeeper'
> [error] 15:54:44,651 DEBUG [pylons.configuration] Pushing process
> configuration
> [error] 15:54:44,681 DEBUG [pylons.configuration] Adding mako engine
> with alias None and {'mako.directories': ['/usr/lib/python2.6/site-
> packages/GateKeeper-0.1dev-py2.6.egg/gatekeeper/templates'],
> 'myghty.component_root': [{'templates': '/usr/lib/python2.6/site-
> packages/GateKeeper-0.1dev-py2.6.egg/gatekeeper/templates'}],
> 'myghty.data_dir': '/var/www/modwsgi/gatekeeper/data/templates',
> 'kid.encoding': 'utf-8', 'kid.assume_encoding': 'utf-8',
> 'mako.module_directory': '/var/www/modwsgi/gatekeeper/data/templates',
> 'myghty.allow_globals': ['c', 'config', 'g', 'h', 'render', 'request',
> 'session', 'translator', 'ungettext', '_', 'N_'],
> 'myghty.output_encoding': 'utf-8', 'myghty.raise_error': True,
> 'mako.output_encoding': 'utf-8', 'mako.filesystem_checks': True}
> options
> [error] 15:54:44,682 DEBUG [pylons.configuration] Loaded mako template
> engine as the default template
> renderer
> [error] 15:54:44,931 DEBUG [pylons.templating] Initialized Buffet
> object
> [error] 15:54:44,933 DEBUG [pylons.templating] Adding mako template
> language for use with
> Buffet
> [error] 15:54:44,934 DEBUG [routes.middleware] Initialized with method
> overriding = True, and path info altering =
> True
> [error] 15:54:45,025 DEBUG [txn.-1335477392] new
> transaction
> [error] 15:54:45,035 DEBUG [routes.middleware] Matched
> GET /
> [error] 15:54:45,036 DEBUG [routes.middleware] Route path: '*url',
> defaults: {'action': u'routes_placeholder', 'controller':
> u'root'}
> [error] 15:54:45,037 DEBUG [routes.middleware] Match dict: {'url':
> u'/', 'action': u'routes_placeholder', 'controller':
> u'root'}
> [error] 15:54:45,038 DEBUG [pylons.wsgiapp] Setting up Pylons stacked
> object
> globals
> [error] 15:54:45,040 DEBUG [pylons.wsgiapp] Setting up paste testing
> environment
> variables
> [error] 15:54:45,041 DEBUG [pylons.wsgiapp] Resolved URL to
> controller:
> u'root'
> [error] 15:54:45,088 DEBUG [tw.core.resources] Registered static at /
> tw.forms/
> static
> [error] 15:54:45,092 DEBUG [tw.core.resources] Registered static/
> calendar at /tw.forms/static/
> calendar
> [error] 15:54:45,183 DEBUG [tg.wsgiapp] Found controller, module:
> 'gatekeeper.controllers.root', class:
> 'RootController'
> [error] 15:54:45,184 DEBUG [pylons.wsgiapp] Controller appears to be a
> class, instantiating
>
> (...)
>
> [error] 15:54:45,192 INFO  [tg.i18n] Set request language to
> []
> [error] 15:54:45,194 INFO  [tg.i18n] Language []: not supported by
> FormEncode
> [error] 15:54:45,195 DEBUG [tg.controllers] No controller-wide
> authorization
> at /
> [error] 15:54:45,198 DEBUG [pylons.controllers.core] Merging
> pylons.response headers into start_response call, status: 404 Not
> Found
> [error] 15:54:45,201 DEBUG [txn.-1335477392]
> commit
> [error] 15:54:45,202 DEBUG [tg.configuration] Removing DBSession from
> current
> thread
> [error] 15:54:45,203 DEBUG [txn.-1335477392] new
> transaction
> [error] 15:54:45,208 DEBUG [routes.middleware] Matched GET /error/
> document
> [error] 15:54:45,209 DEBUG [routes.middleware] Route path: '*url',
> defaults: {'action': u'routes_placeholder', 'controller':
> u'root'}
> [error] 15:54:45,210 DEBUG [routes.middleware] Match dict: {'url': u'/
> error/document', 'action': u'routes_placeholder', 'controller':
> u'root'}
> [error] 15:54:45,211 DEBUG [pylons.wsgiapp] Setting up Pylons stacked
> object
> globals
> [error] 15:54:45,212 DEBUG [pylons.wsgiapp] Setting up paste testing
> environment
> variables
> [error] 15:54:45,214 DEBUG [pylons.wsgiapp] Resolved URL to
> controller:
> u'root'
> [error] 15:54:45,215 DEBUG [pylons.wsgiapp] Controller appears to be a
> class,
> instantiating
> [error] 15:54:45,216 DEBUG [pylons.wsgiapp] Calling controller class
> with WSGI interface
>
> (...)
>
> [error] 15:54:45,223 INFO  [tg.i18n] Set request language to []
> [error] 15:54:45,225 INFO  [tg.i18n] Language []: not supported by
> FormEncode
> [error] 15:54:45,226 DEBUG [tg.controllers] No controller-wide
> authorization at /error/document
> [error] 15:54:45,229 DEBUG [pylons.controllers.core] Merging
> pylons.response headers into start_response call, status: 404 Not
> Found
> [error] 15:54:45,231 DEBUG [txn.-1335477392] commit
> [error] 15:54:45,232 DEBUG [tg.configuration] Removing DBSession from
> current thread
> [error] [client 192.168.1.103] mod_wsgi (pid=21618): Target WSGI
> script '/var/www/modwsgi/gatekeeper/gatekeeper.wsgi' cannot be loaded
> as Python module.
> [error] [client 192.168.1.103] mod_wsgi (pid=21618): Exception
> occurred processing WSGI script '/var/www/modwsgi/gatekeeper/
> gatekeeper.wsgi'.
> [error] [client 192.168.1.103] Traceback (most recent call last):
> [error] [client 192.168.1.103]   File "/var/www/modwsgi/gatekeeper/
> gatekeeper.wsgi", line 55, in <module>
> [error] [client 192.168.1.103]     app.get("/")
> [error] [client 192.168.1.103]   File "/usr/lib/python2.6/site-
> packages/Paste-1.7.3-py2.6.egg/paste/fixture.py", line 208, in get
> [error] [client 192.168.1.103]     return self.do_request(req,
> status=status)
> [error] [client 192.168.1.103]   File "/usr/lib/python2.6/site-
> packages/Paste-1.7.3-py2.6.egg/paste/fixture.py", line 406, in
> do_request
> [error] [client 192.168.1.103]     self._check_status(status, res)
> [error] [client 192.168.1.103]   File "/usr/lib/python2.6/site-
> packages/Paste-1.7.3-py2.6.egg/paste/fixture.py", line 439, in
> _check_status
> [error] [client 192.168.1.103]     res.body))
> [error] [client 192.168.1.103] AppError: Bad response: 404 Not Found
> (not 200 OK or 3xx redirect for /)
> [error] [client 192.168.1.103] 404 Not Found
> [error] [client 192.168.1.103]
> [error] [client 192.168.1.103] The resource could not be found.
> [error] [client 192.168.1.103]
> [error] [client 192.168.1.103]
> [debug] ssl_engine_kernel.c(1893): OpenSSL: Write: SSL negotiation
> finished successfully
> [info] [client 192.168.1.103] Connection closed to child 1 with
> standard shutdown (server gatekeeper.localhost:443)
>
> As I'm fresh to TurboGears2 and modwsgi I could use some help here.
> Thanks!
>
> PS: I can post my vhost config, gatekeeper.wsgi script and
> production.ini if requested. Just don't want to stuff more text in
> this already long email :)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To post to this group, send email to modw...@googlegroups.com.
> To unsubscribe from this group, send email to 
> modwsgi+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/modwsgi?hl=en.

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

Reply via email to