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.
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.
OMERO.web uses the Web Server Gateway Interface (WSGI) as a primary deployment platform. The Python standard PEP 3333 that describes how a web server communicates with web applications.
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.
Additional settings can be configured by changing the following properties:
omero.web.wsgi_workers to (2 x NUM_CORES) + 1
Note
Do not scale the number of workers to the number of clients you expect to have. OMERO.web should only need 4-12 worker processes to handle many requests per second.
If you have installed Apache, install mod_wsgi.
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 maximum-requests=0 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.
OMERO.web is used in ‘daemon’ mode where UNIX sockets are used to communicate between the Apache child processes and the daemon processes which are to handle a request. OMERO.web does not provide any management for these ‘daemon’ processes; bin/omero web start/status/stop will not work as they are for managing gunicorn processes only.