Page Contents

OMERO

Downloads
Feature List
Licensing

Previous topic

OMERO.web IIS deployment (Windows)

Next topic

OMERO.web Nginx and Gunicorn deployment (Unix/Linux)

This Page

Note

This documentation is for the new OMERO 5.2 version. See the latest OMERO 5.1.x version or the previous versions page to find documentation for the OMERO version you are using if you have not upgraded yet.

OMERO.web Apache and mod_wsgi deployment (Unix/Linux)

Apache 2.2+ with mod_wsgi configuration (Unix/Linux)

Note

Since OMERO 5.2, the OMERO web framework no longer bundles a copy of the Django package, instead manual installation of the Django dependency is required. It is highly recommended to use Django 1.8 (LTS) which requires Python 2.7. For more information see Python on the Version requirements page.

If you have installed Apache, install mod_wsgi.

Install Django 1.8 using package requirements file:

$ pip install -r share/web/requirements-py27-apache.txt

Note

For more details refer to how to install Django 1.8 or hot to upgrade Django to 1.8.

OMERO can automatically generate a configuration file for your web server. The location of the file will depend on your system, please refer to your web server’s manual. See Customizing your OMERO.web installation for additional customization options.

Set the following:

$bin/omero config set omero.web.application_server "wsgi"

Creates symlinks for static media files

$bin/omero web syncmedia

To create a site configuration file for inclusion in the main Apache configuration redirect the output of the following command into a file:

$ bin/omero web config apache
<VirtualHost _default_:80>

  WSGIDaemonProcess omeroweb processes=5 threads=1 display-name=%{GROUP} user=omero python-path=/usr/lib64/python2.6/site-packages/Ice:/home/omero/OMERO.server/lib/python:/home/omero/OMERO.server/lib/fallback:/home/omero/OMERO.server/lib/python/omeroweb

  WSGIScriptAlias / /home/omero/OMERO.server/lib/python/omeroweb/wsgi.py process-group=omeroweb

  <Directory "/home/omero/OMERO.server/lib/python/omeroweb">
    WSGIProcessGroup omeroweb
    WSGIApplicationGroup %{GLOBAL}
    Order allow,deny
    Allow from all
  </Directory>

  Alias /static /home/omero/OMERO.server/lib/python/omeroweb/static
  <Directory "/home/omero/OMERO.server/lib/python/omeroweb/static">
      Options -Indexes FollowSymLinks
      Order allow,deny
      Allow from all
  </Directory>

</VirtualHost>

# see https://code.google.com/p/modwsgi/wiki/ConfigurationIssues
WSGISocketPrefix run/wsgi
# Use this on Ubuntu/Debian/MacOSX systems:
# WSGISocketPrefix /var/run/wsgi

To configure an HTTPS server follow the Apache documentation.

Then reload Apache.