OMERO.web WSGI deployment
=========================
.. _wsgi_configuration:
WSGI Configuration (Unix/Linux)
-------------------------------
If you have installed Nginx or Apache OMERO can automatically generate a
configuration file for your web server, see :ref:`apache_wsgi_configuration`
or :ref:`nginx_gunicorn_wsgi_configuration`.
The location of the file will depend on your system, please refer to your
web server's manual. See :ref:`customizing_your_omero_web_installation_unix`
for additional customization options.
.. _apache_wsgi_configuration:
Apache 2.2+ configuration (mod_wsgi)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Install `mod\_wsgi `_.
Set the following:
::
$bin/omero config set omero.web.application_server "wsgi"
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-wsgi
.. literalinclude:: apache-wsgi-omero.conf
:lines: 55-
To configure an HTTPS server follow
`the Apache documentation `_.
Then reload apache.
.. _nginx_gunicorn_wsgi_configuration:
Nginx Gunicorn configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Set the following:
::
$bin/omero config set omero.web.application_server "wsgi-tcp"
To create a site configuration file for inclusion in a system-wide nginx
configuration redirect the output of the following command into a file:
::
$ bin/omero web config nginx-wsgi
.. literalinclude:: nginx-wsgi-omero.conf
.. note::
OMERO.web requires ``body_in_file_only`` adjusted in your default nginx
config because nginx must buffer incoming data. Make sure you have that
set to the following config:
::
http {
...
sendfile on;
send_timeout 60s;
client_max_body_size 0;
...
}
To configure an HTTPS server follow
`the nginx documentation `_.
Start the Gunicorn worker processes running one thread listening on 127.0.0.1:4080:
::
$ bin/omero web start
... static files copied to '/usr/local/dev/openmicroscopy/dist/lib/python/omeroweb/static'.
Starting OMERO.web... [OK]
Additional settings can be configured from command line arguments:
.. program:: omero web start
.. option:: --workers WORKERS
The number of worker processes for handling requests.
.. option:: --worker-connections WORKER_CONNECTIONS
The maximum number of simultaneous clients.
.. option:: --wsgi-args WSGI_ARGS
Additional arguments. For more details check
`Gunicorn Documentation `_.
The Gunicorn workers are managed **separately** from other OMERO.server
processes. You can check their status or stop them using the
following commands:
::
$ bin/omero web status
OMERO.web status... [RUNNING] (PID 59217)
$ bin/omero web stop
Stopping OMERO.web... [OK]
Django WSGI workers (PID 59217) killed.