hi,
i followed the tutorial on setting up mediacore for production environment using mod_wsgi and apache2. i done all the steps just as explained. but when i try to call mediacore in my browser, i get an internal server error and apache's error.log says the following:
thx[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] mod_wsgi (pid=14513): Target WSGI script '/var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/deployment-scripts/mod_wsgi/mediacore.wsgi' cannot be loaded as Python module.
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] mod_wsgi (pid=14513): Exception occurred processing WSGI script '/var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/deployment-scripts/mod_wsgi/mediacore.wsgi'.
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] Traceback (most recent call last):
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/deployment-scripts/mod_wsgi/mediacore.wsgi", line 16, in <module>
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] application = loadapp('config:'+deployment_config)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 204, in loadapp
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] return loadobj(APP, uri, name=name, **kw)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 224, in loadobj
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] global_conf=global_conf)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 248, in loadcontext
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] global_conf=global_conf)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 278, in _loadconfig
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] return loader.get_context(object_type, name, global_conf)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 409, in get_context
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] section)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 431, in _context_from_use
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] object_type, name=use, global_conf=global_conf)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 361, in get_context
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] global_conf=global_conf)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 248, in loadcontext
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] global_conf=global_conf)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 285, in _loadegg
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] return loader.get_context(object_type, name, global_conf)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 561, in get_context
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] object_type, name=name)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/loadwsgi.py", line 581, in find_egg_entry_point
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] pkg_resources.require(self.spec)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 648, in require
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] needed = self.resolve(parse_requirements(requirements))
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] File "/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg/pkg_resources.py", line 546, in resolve
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] raise DistributionNotFound(req)
[Fri Jun 24 17:17:29 2011] [error] [client 80.137.79.195] DistributionNotFound: MediaCore
my apache virtualhost config looks like this:
WSGIPythonHome /var/www/safetyfirst/mediacore_env
<VirtualHost *:80>
ServerName http://www.tommytest.de
DocumentRoot /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0
WSGIDaemonProcess mcore \
threads=10 \
display-name=%{GROUP} \
python-path=/var/www/safetyfirst/mediacore_env/lib/python2.6/site-packages \
python-eggs=/var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/data/python-egg-cache
WSGIProcessGroup mcore
# Intercept all requests to /my_media/* and pass them to mediacore.wsgi
WSGIScriptAlias /my_media /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/deployment-scripts/mod_wsgi/mediacore.wsgi
# Make the url accessible (just in case it's not already)
<Location "/my_media">
Allow from all
Satisfy all
</Location>
<Directory /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0>
Order allow,deny
Allow from all
Satisfy all
</Directory>
# Make the wsgi script accessible
<Directory /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/deployment-scripts/mod_wsgi>
Order allow,deny
Allow from all
Satisfy all
</Directory>
# Create an exception for media and podcast image from your data directory
AliasMatch /my_media/images/(media|podcasts)(.*) /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/data/images/$1$2
# Create an exception for all static mediacore content
AliasMatch /my_media/(admin/)?(images|scripts|styles)(.*) /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/mediacore/public/$1$2$3
# Create an exception for your custom appearance css and images
Alias /my_media/appearance /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/data/appearance
# Make all the static content accessible
<Directory /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0/mediacore/public/*>
Order allow,deny
Allow from all
Satisfy all
Options -Indexes
</Directory>
</VirtualHost>
so my python virtualenv ist located under /var/www/safetyfirst/mediacore_env and my app-root is located under /var/www/safetyfirst/tommybrett1977_mediacore/MediaCore-0.9.0... these paths are correct.
can anybody plz help? tried to figure out several things by googling around, but with no success :-(
thx!