[ome-users] Deploying OMERO.web with Apache/mod_python

Curtis Rueden ctrueden at wisc.edu
Sat Oct 24 00:00:57 BST 2009


Hi everyone,

I installed OMERO-Beta4.1 successfully on an Ubuntu Linux 9.04 (Jaunty)
server.

However, I ran into problems trying to get OMERO.web working with
Apache+mod_python as described on the "Web on production" page at:
  http://www.openmicroscopy.org.uk/site/support/omero4/server/install_web

I was able to overcome them, so I thought I would pass on the steps to do
so, in case anyone else has similar difficulties.

1) In the "Configure mod_python" step, presumably you are supposed to edit
/etc/apache2/sites-available/default (or other Apache configuration file),
placing those lines inside the relevant VirtualHost block, but it never
indicates that anywhere. I suggest placing the Location block just before
the "</VirtualHost>" at the bottom of the file.

After editing the Apache configuration file, as you might expect (but is not
documented anywhere), you should execute:
  sudo /etc/init.d/apache2 reload

2) When I ran the "syncdb" step, it initially blew up. The fix required two
changes:

  A) Install Django:
    sudo aptitude install python-django

  B) Chown the webdb and weblog folders back to omero:omero temporarily:
    sudo chown -R omero:omero ~omero/omero/webdb ~omero/omero/weblog
  And then back to www-data:www-data afterward.

3) I then ran into a problem accessing the URL in the web browser. The
modules "webadmin.controller" and "webclient.controller" were not found.
Looking in the OMERO distribution's lib/python folder, it appears that some
modules are nested in a subdirectory called "omeroweb" -- so to fix the
problem, I edited the Apache configuration file again, changing:
        PythonPath "['/home/omero/omero_dist/lib/python'] + sys.path"
To:
        PythonPath "['/home/omero/omero_dist/lib/python'] +
['/home/omero/omero_dist/lib/python/omeroweb'] + sys.path"

Make sure these paths match where you actually have your omero_dist tree.
Then restart your Apache again ("sudo /etc/init.d/apache2 reload").

With these steps I was able to get OMERO.web working with Apache+mod_python;
I hope it is helpful to others as well.


Three additional comments for the developers:

1) When editing default.xml in the "Configuration Guide for mod_python"
section, regarding the line with id="Web" and act="on-demand" is not
commented out: the instructions are inconsistent. One place says to "comment
the following" while another says to "re-configure the Web server in
default.xml to be on-demand." Reading the lightweight OMERO.web
instructions, it suggests changing "on-demand" to "always" so I am guessing
this step means to change it back from "always" to "on-demand"? (I left the
line alone and things are working for me.)

2) On the OMERO server install page, I would suggest splitting out the
Django server OMERO.web installation instructions into their own page as
well, and just providing two links: one to the Django instructions (marked
"easier but only suitable for localhost configuration") and the
Apache/mod_python ones (marked "more involved but suitable for a production
environment"). Right now it is not clear which, if any, of the OMERO.web
instructions from the main page are applicable to the Apache/mod_python way
of doing things.

3) FYI, the log in ~omero/weblog still reports: "2009-10-23 17:40:24,601
omero.util.UpgradeCheck: WARNING  UPGRADE AVAILABLE:Please upgrade to
Beta-4.1-RC1 See http://trac.openmicroscopy.org.uk/omero for the latest
version"


Regards,
Curtis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20091023/e799dc49/attachment.html>


More information about the ome-users mailing list