[Wed Aug 04 20:58:35 2010] [error] [client 127.0.0.1] Error - <type
'exceptions.OSError'>: [Errno 20] Not a directory: '/usr/local/
turbogears/BASELINE/lib/python2.5/site-packages/myapp-0.1dev-py2.5.egg/
myapp/controllers'
I am trying to get a quickstarted (non modifide) distributed under
mod_wsgi. I know I'm doing something wrong, but I can't put my finger
on it.
I am new to Python eggs and python distribution stuff.
My app when installed in the Vitual Enviroment seem's to want to stay
in an egg file when runing the myapp.wsgi script.
---------
here's the relevant files
---------
# Begin Apache 2 conf, filename "myapp", path "/etc/apache2/sites-
available"
Alias /myapp/images /usr/local/turbogears/myapp/myapp/public/images
Alias /myapp/css /usr/local/turbogears/myapp/myapp/public/css
Alias /myapp/javascript /usr/local/turbogears/myapp/myapp/public/
javascript
# my BASELINE is probably wrong(i.e. it may not be a BASELINE)
WSGIPythonHome /usr/local/turbogears/BASELINE/
WSGIDaemonProcess myapp threads=10 processes=3
WSGIProcessGroup myapp
WSGIScriptAlias /myapp /usr/local/turbogears/myapp/apache/myapp.wsgi
<Directory /usr/local/turbogears/myapp/apache>
Order deny,allow
Allow from all
</Directory>
# End Apache 2 conf
---------------
# Begin myapp.wsgi, path "/usr/local/turbogears/myapp/apache"
import sys
prev_sys_path = list(sys.path)
import site
site.addsitedir('/usr/local/pythonenv/BASELINE/lib/python2.5/site-
packages')
new_sys_path = []
for item in list(sys.path):
if item not in prev_sys_path:
new_sys_path.append(item)
sys.path.remove(item)
sys.path[:0] = new_sys_path
import os, sys
sys.path.append('/usr/local/turbogears/myapp')
os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myapp/python-
eggs'
from paste.script.util.logging_config import fileConfig
fileConfig('/usr/local/turbogears/myapp/production.ini')
from paste.deploy import loadapp
application = loadapp('config:/usr/local/turbogears/myapp/
production.ini')
# End myapp.wsgi
----------------
# Begin production.ini
#
# myapp - TurboGears configuration
#
# The %(here)s variable will be replaced with the parent directory of
this file
#
[DEFAULT]
# WARGING == If debug is not set to false, you'll get the interactive
# debugger on production, which is a huge security hole.
debug = false
email_to = [email protected]
smtp_server = localhost
error_email_from = pa...@localhost
[server:main]
use = egg:Paste#http
host = 0.0.0.0
#port = 8080
[app:main]
use = egg:myapp
full_stack = true
cache_dir = %(here)s/data
beaker.session.key = myapp
beaker.session.secret = 6LH9mO+an90u6/gmVPtvY8ZZ3
app_instance_uuid = {53f38e78-b8f9-4f82-a443-f88b8423d567}
# If you'd like to fine-tune the individual locations of the cache
data dirs
# for the Cache data, or the Session saves, un-comment the desired
settings
# here:
#beaker.cache.data_dir = %(here)s/data/cache
#beaker.session.data_dir = %(here)s/data/sessions
# Specify the database for SQLAlchemy to use via
# turbogears.database
# %(here) may include a ':' character on Windows environments; this
can
# invalidate the URI when specifying a SQLite db via path name
sqlalchemy.url = sqlite:///%(here)s/somedb.db
sqlalchemy.echo = False
# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION
ENVIRONMENT*
# Debug mode will enable the interactive debugging tool, allowing
ANYONE to
# execute malicious code after an exception is raised.
#set debug = false
# Logging configuration
# Add additional loggers, handlers, formatters here
# Uses python's logging config file format
# http://docs.python.org/lib/logging-config-fileformat.html
[loggers]
keys = root, myapp, sqlalchemy, auth
[handlers]
keys = console
[formatters]
keys = generic
# If you create additional loggers, add them as a key to [loggers]
[logger_root]
level = INFO
handlers = console
[logger_myapp]
level = INFO
handlers =
qualname = myapp
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)
# A logger for authentication, identification and authorization --
this is
# repoze.who and repoze.what:
[logger_auth]
level = WARN
handlers =
qualname = auth
# If you create additional handlers, add them as a key to [handlers]
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
# If you create additional formatters, add them as a key to
[formatters]
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %
(message)s
datefmt = %H:%M:%S
# End production.ini
--
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.