Page Contents

OMERO

Downloads
Feature List
Licensing

Previous topic

OMERO.web WSGI deployment

Next topic

Basic Windows server installation

This Page

OMERO.web FastCGI deployment (DEPRECATED)

Deprecated since version 5.1.4: OMERO.web deployment using FastCGI is deprecated and will be removed in OMERO 5.2. Use OMERO.web WSGI deployment as an alternative.

FastCGI Configuration (Unix/Linux)

If you have installed Nginx or Apache OMERO can automatically generate a configuration file for your web server, see Apache 2.2 configuration (mod_fastcgi), Apache 2.4+ configuration (mod_proxy_fcgi) or Nginx FastCGI configuration. 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.

Apache 2.2 configuration (mod_fastcgi)

Install mod_fastcgi. 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
###

FastCGIExternalServer "/var/run/omero.fcgi" -host 127.0.0.1:4080 -idle-timeout 60

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

<Directory "/home/omero/OMERO.server/etc/templates/error">
    Options -Indexes FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

<Location />
    ErrorDocument 500 /error/maintainance.html
</Location>

Alias /error /home/omero/OMERO.server/etc/templates/error
Alias /static /home/omero/OMERO.server/lib/python/omeroweb/static
Alias / "/var/run/omero.fcgi/"

Note

The default configuration file installed with mod_fastcgi may be incompatible with OMERO. In particular, the FastCGIWrapper option conflicts with FastCGIExternalServer required by OMERO and must be removed or commented out.

To configure an HTTPS server follow the Apache documentation.

Apache 2.4+ configuration (mod_proxy_fcgi)

The mod_proxy_fcgi, mod_proxy and mod_rewrite Apache modules should already be installed and enabled as part of the Apache installation, if this is not the case then enable them. 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-fcgi
###
### Stanza for OMERO.web created 2015-09-24 14:53:15.182556
###

RewriteEngine on

<Directory "/home/omero/OMERO.server/lib/python/omeroweb/static">
    Options -Indexes +FollowSymLinks
    Require all granted
</Directory>

<Directory "/home/omero/OMERO.server/etc/templates/error">
    Options -Indexes +FollowSymLinks
    Require all granted
</Directory>

<Location fcgi://127.0.0.1:4080/>
    Require all granted
</Location>

<Location /.fcgi/>
    ErrorDocument 503 /error/maintainance.html
</Location>

Alias /error /home/omero/OMERO.server/etc/templates/error
Alias /static /home/omero/OMERO.server/lib/python/omeroweb/static

RewriteCond %{REQUEST_URI} !^(/static|/.fcgi|/error)
RewriteRule ^(/|$)(.*) /.fcgi/$2 [PT]
SetEnvIf Request_URI . proxy-fcgi-pathinfo=1
ProxyPass /.fcgi/ fcgi://127.0.0.1:4080/

Nginx FastCGI configuration

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
    server {
        listen       80;
        server_name  $hostname;

        sendfile on;
        client_max_body_size 0;

        # maintenance page serve from here
        location @maintenance {
            root /home/omero/OMERO.server/etc/templates/error;
            try_files $uri /maintainance.html =502;
        }

        # weblitz django apps serve media from here
        location /static {
            alias /home/omero/OMERO.server/lib/python/omeroweb/static;
        }

        location / {

            error_page 502 @maintenance;

            fastcgi_pass 127.0.0.1:4080;

            fastcgi_param PATH_INFO $fastcgi_script_name;


            fastcgi_param REQUEST_METHOD $request_method;
            fastcgi_param QUERY_STRING $query_string;
            fastcgi_param CONTENT_TYPE $content_type;
            fastcgi_param CONTENT_LENGTH $content_length;
            fastcgi_param SERVER_NAME $server_name;
            fastcgi_param SERVER_PROTOCOL $server_protocol;
            fastcgi_param SERVER_PORT $server_port;
            fastcgi_pass_header Authorization;
            fastcgi_intercept_errors on;
            fastcgi_read_timeout 60;
            # Uncomment if nginx SSL module is enabled or you are using nginx 1.1.11 or later
            # -- See: #10273, http://nginx.org/en/CHANGES
            # fastcgi_param HTTPS $https;
        }

    }

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.

Note

Make sure fastcgi_param HTTPS $https; is uncommented.

Starting OMERO.web

Start the Django FastCGI workers:

$ bin/omero web start
... static files copied to '/usr/local/dev/openmicroscopy/dist/lib/python/omeroweb/static'.
Starting OMERO.web... [OK]

The Django FastCGI 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 FastCGI workers (PID 59217) killed.