On 24/01/2008, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
> ok lets get this working first.
>
>
> > > This is the error I am getting in my logs:
> > > cat /var/log/apache2/error.log
> > > -- resuming normal operations
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] mod_wsgi
> > > (pid=4177): Target WSGI script '/etc/myfirstapp/myfirstapp.wsgi'
> > > cannot be loaded as Python module.
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] mod_wsgi
> > > (pid=4177): Exception occurred within WSGI script
> > > '/etc/myfirstapp/myfirstapp.wsgi'.
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] Traceback (most
> > > recent call last):
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] File
> > > "/etc/myfirstapp/myfirstapp.wsgi", line 13, in ?
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1]
> > > turbogears.update_config(configfile="/etc/myfirstapp/prod.cfg",
> > > modulename="myfirstapp.config")
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] File
> > > "/var/lib/python-support/python2.4/turbogears/config.py", line 207, in
> > > update_config
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1]
> > > configure_loggers(configdict)
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] File
> > > "/var/lib/python-support/python2.4/turbogears/config.py", line 143, in
> > > configure_loggers
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1]
> > > _get_handlers(handlers, formatters)
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] File
> > > "/var/lib/python-support/python2.4/turbogears/config.py", line 50, in
> > > _get_handlers
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] raise
> > > ConfigError("Missing or wrong argument to "
> > > [Wed Jan 23 16:23:02 2008] [error] [client 127.0.0.1] ConfigError:
> > > Missing or wrong argument to FileHandler in handler access_out ->
> > > [Errno 13] Permission denied: 'server.log'
>
> > What in your configuration mentions 'server.log'?
>
> ok I changed the 'server.log' to a full path.
>
> >
> My tg app is working but the static content is missing.
> Normally when you start tgapp it expects the www.example.com/static/
> How is that handled in mod_wsgi?
>
> These are the current settings in app.cfg:
> [/static]
> static_filter.on = True
> static_filter.dir = "%(top_level_dir)s/static"
I wouldn't expect serving up of static content to be affected unless
the location it is pointing at simply isn't where the files are
located.
In mod_wsgi, if you want Apache to serve up static files instead, so
that things are more effecient, then would use:
Alias /static /some/path/to/dir/static
<Directory /some/path/to/dir/static>
Order Allow,Deny
Allow from All
</Directory>
The Alias directive should appear before the WSGIScriptAlias directive
in the Apache configuration.
That directory and the files in it would need to be readable to user
that Apache runs as.
For more about static file serving see section 'Hosting Of Static Files' of:
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
It would be a good idea to read through the whole of that document as
explains various other configurations as well and may help to explain
things a bit better if you haven't already read it.
Graham
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---