DEPRECATED: OMERO.web Apache and mod_wsgi deployment (Unix/Linux) ================================================================= .. _apache_wsgi_configuration: 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 :ref:`python-requirements` on the :doc:`/sysadmins/version-requirements` page. Also note that support for Apache deployment is deprecated as of OMERO 5.2.6 and is likely be dropped during the 5.3.x line. 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. .. _apache_default_configuration: Apache default configuration (Unix/Linux) ----------------------------------------- Install `Django 1.8`_ using package requirements file: :: $ pip install -r share/web/requirements-py27-apache.txt .. note:: For more details refer to :djangodoc:`how to install Django 1.8 ` or :djangodoc:`hot to upgrade Django to 1.8 `. Additional settings can be configured by changing the following properties: - :property:`omero.web.application_server.max_requests` to 500 - :property:`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. .. _apache_mod_wsgi_configuration: Apache configuration (Unix/Linux) --------------------------------- 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 :ref:`customizing_your_omero_web_installation_unix` 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: For Apache 2.4, run the following command: :: $ bin/omero web config apache24 > httpd-omero.conf For Apache 2.2, run the following command: :: $ bin/omero web config apache > httpd-omero.conf Configuration file: .. literalinclude:: apache-omero.conf :lines: 55- To configure an HTTPS server follow `the Apache documentation `_. Then reload Apache. Running OMERO.web (Unix/Linux) ------------------------------ 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.**