[ome-users] Problems setting up production OMERO using 'mod_wsgi'
Todd H. Stokes
todd.stokes at bme.gatech.edu
Wed Aug 4 21:09:53 BST 2010
Hello,
I demo'ed OMERO 4.2 for a week or so by connecting to the packaged
Django demo server on port 8000 per the instructions on the site. The
OMERO distribution was unzipped into a folder on my user desktop on our
server. I created a lot of data in the database, which I would like to
preserve through the process of "upgrading" to a production web server.
I figured out how to host python code in apache using mod_wsgi (which is
recommended to replace mod_python and is pretty similar). Then I figured
out where to change permissions on all the directories and where to set
various path variables so that the apache user would find the right
versions of all the dependencies (hint: "universal settings" in
/etc/profile doesn't seem to apply to apache).
Finally, I commented out the "sys.exit(1)" line of code in:
omero-dist/lib/python/omeroweb/settings.py
because even though my settings were in place, it always executed the
exit when calling through the WSGI interface. (I don't know how to
verify that the settings were successfully loaded, though).
At this point, I can see the login screen, but none of the credentials
that worked on my demo server are working.
This web server is running a number of other web services, so my WSGI
config looks like this:
WSGIScriptAlias /omero
/home/tstokes/Desktop/SRM_tcga/OME/omero/wsgi-scripts/django.wsgi
and my application host variable is set up like this:
APPLICATION_HOST='http://hermes.bme.gatech.edu/omero'
A typical authentication error from the OMEROweb.log is attached. In
other cases, I don't get the password checked error in the log or the
"Error: Client version does not match server, please contact
administrator" on the page. Instead the page simply refreshes despite
the log showing no error (second attachment). I think this may indicate
that the pages redirects are confused. The third attachment shows the
apache error log, with requests being generated to both appmedia and
webclient URLs without the necessary '/omero' part of the path.
One major point of confusion for me is in the instructions at:
http://www.openmicroscopy.org.uk/site/support/omero4/server/install_web
there is a sample mod_python configuration code snip that includes the line:
SetEnv DJANGO_SETTINGS_MODULE omeroweb.settings
mod_wsgi uses a similar instruction, but I can't find any guide to what
the file 'omeroweb.settings' should contain. For now, I copied my
custom_settings.py file to this file name.
If I can get the setup working, I would like to move the omero
distribution folder out of my home directory (where it must be open to
access by the apache user) and into the directory of a new 'omero' user.
I've started this process in parallel, but I am running into the same
authentication issue on that instance, also.
If necessary, I can document more completely the steps that I've taken.
They might be helpful in generating new documentation that addresses
this mod_wsgi case.
Thanks!
Todd
More information about the ome-users
mailing list