Hi,
I want to setup a test environment on apache.
If I want to open the website, I got an Internal Server Error.
I have installed mediadrop on: /var/www/
with the following files: data deployment.ini html mediadrop mediadrop.wsgi venv
In the Error.log, I see the following errors:
[Mon Mar 07 12:00:58.633893 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] mod_wsgi (pid=3075): Target WSGI script '/var/www/mediadrop.wsgi' cannot be loaded as Python module.
[Mon Mar 07 12:00:58.633975 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] mod_wsgi (pid=3075): Exception occurred processing WSGI script '/var/www/mediadrop.wsgi'.
[Mon Mar 07 12:00:58.634008 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] Traceback (most recent call last):
[Mon Mar 07 12:00:58.634146 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] File "/var/www/mediadrop.wsgi", line 12, in <module>
[Mon Mar 07 12:00:58.634159 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] from paste.script.util.logging_config import fileConfig
[Mon Mar 07 12:00:58.634178 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] File "/var/www/venv/lib/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/util/logging_config.py", line 255
[Mon Mar 07 12:00:58.634187 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] raise NotImplementedError, "listen() needs threading to work"
[Mon Mar 07 12:00:58.634206 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] ^
[Mon Mar 07 12:00:58.634216 2016] [:error] [pid 3075:tid 140081074743040] [remote x.x.x.x:817] SyntaxError: invalid syntax
I've pasted the following at the bottom of my apache2.conf:
# You can tweak the WSGIDaemonProcess directive for performance, but this
# will work for now.
# Relevant doc pages:
# http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading
# http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIDaemonProcess
# Hint: pay attention to issues surrounding worker-mpm and prefork-mpm.
# For best performance the number of processes should equal the number of CPU
# cores (but please note that each process may use about 500 MB RAM).
WSGIDaemonProcess mcore \
processes=2 \
threads=1 \
display-name=%{GROUP} \
python-path=/var/www/venv/lib/python2.7/site-packages \
python-eggs=/var/www/data/python-egg-cache
WSGIProcessGroup mcore
# Intercept all requests to /my_media/* and pass them to mediadrop.wsgi
WSGIScriptAlias /my_media /var/www/mediadrop.wsgi
# Create an exception for media and podcast image from your data directory
AliasMatch ^/my_media/images/(media|podcasts)(.*) /var/www/data/images/$1$2
# Create an exception for all static MediaDrop content
AliasMatch ^/my_media/(admin/)?(images|scripts|styles)(.*) /var/www/mediadrop/mediadrop/public/$1$2$3
# Create an exception for your custom appearance css and images
Alias /my_media/appearance /var/www/data/appearance
# Make all the static content accessible
<Directory /var/www/mediadrop/mediadrop/public/*>
Order allow,deny
Allow from all
Options -Indexes
</Directory>
My mediadrop.wsgi:
deployment_config = '/var/www/deployment.ini'
temp_dir = '/var/www/data/tmp'
# NOTE: Before running MediaDrop, you will need to update the two paths
# above to point to the appropriate locations for your installation.
import os
os.environ['TMPDIR'] = temp_dir
if __name__.startswith('_mod_wsgi_'):
# Set up logging under mod_wsgi
from paste.script.util.logging_config import fileConfig
fileConfig(deployment_config)
# Load the app!
from paste.deploy import loadapp
application = loadapp('config:'+deployment_config)
Do you have any ideas what i've done wrong?
Thanks in advance :-)
MME