You will need to have an OMERO server running that you can connect to. This will typically be on your own machine, although it does not necessarily have to be. If you want to connect to another server (not localhost) you can edit the server list as described on the OMERO.web deployment page (see Unix Customizing your OMERO.web installation or Windows Customizing your OMERO.web installation version) and choose that server when you log in. That page also describes how to set debug to ‘True’ which is important when developing with OMERO.web and you should also be using the Django ‘development’ server.
All that is required to use the Django lightweight development server is to set the omero.web.application_server configuration option, turn Debugging on and start the server up:
$ bin/omero config set omero.web.application_server development
$ bin/omero config set omero.web.debug True
$ bin/omero web start
INFO:__main__:Application Starting...
INFO:root:Processing custom settings for module omeroweb.settings
...
Validating models...
0 errors found
Django version 1.6, using settings 'omeroweb.settings'
Starting development server at http://0.0.0.0:4080/
Quit the server with CONTROL-C.
All that is required to use the Django lightweight development server is to set the omero.web.application_server configuration option, turn Debugging on and start the server up:
C:\omero_dist>bin\omero config set omero.web.application_server development
C:\omero_dist>bin\omero config set omero.web.debug True
C:\omero_dist>bin\omero web start
INFO:__main__:Application Starting...
INFO:root:Processing custom settings for module omeroweb.settings
...
Validating models...
0 errors found
Django version 1.6, using settings 'omeroweb.settings'
Starting development server at http://0.0.0.0:4080/
Quit the server with CTRL-BREAK.
Once you have installed a FastCGI capable web server, configuration of OMERO.web is quite straightforward.
Choose between FastCGI TCP (recommended) or FastCGI (advanced):
$ bin/omero config set omero.web.application_server "fastcgi" / "fastcgi-tcp"
$ bin/omero config set omero.web.debug True
By default OMERO.web expects to be run from the root URL of the web server. It can be configured to run from a sub-directory, for example http://example.org/omero/, as follows:
$ bin/omero config set omero.web.force_script_name '/omero'
$ bin/omero config set omero.web.static_url '/omero/static/'
Place the stanza in your web server configuration file. To create a configuration file for a standalone instance of nginx redirect the output of the following command into a file:
$ bin/omero web config nginx > etc/nginx.conf
pid /usr/local/dev/openmicroscopy/dist/var/pid.nginx;
error_log /usr/local/dev/openmicroscopy/dist/var/log/nginx_error.log;
worker_processes 5;
working_directory /usr/local/dev/openmicroscopy/dist/var;
events {
worker_connections 1024;
}
http {
access_log /usr/local/dev/openmicroscopy/dist/var/log/nginx_access.log;
include /usr/local/dev/openmicroscopy/dist/etc/mime.types;
default_type application/octet-stream;
client_body_temp_path %(ROOT)s/var/nginx_tmp;
sendfile on;
send_timeout 60s;
client_max_body_size 0;
keepalive_timeout 65;
server {
listen 8080;
server_name _;
fastcgi_temp_path /usr/local/dev/openmicroscopy/dist/var/nginx_tmp;
proxy_temp_path /usr/local/dev/openmicroscopy/dist/var/nginx_tmp;
# weblitz django apps serve static content from here
location /omero/static {
alias /usr/local/dev/openmicroscopy/dist/lib/python/omeroweb/static;
}
location /omero {
if (-f /usr/local/dev/openmicroscopy/dist/var/maintenance.html) {
error_page 503 /maintenance.html;
return 503;
}
fastcgi_pass 0.0.0.0: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;
}
location /omeromaintenance.html {
root /usr/local/dev/openmicroscopy/dist/var;
}
}
}
The above configuration is designed for running nginx as the omero user or similar. Now you can start your nginx instace with the following command:
nginx -c /usr/local/dev/openmicroscopy/dist/etc/nginx.conf
for inclusion in a system-wide nginx configuration see Unix or Windows version.
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]
Note
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.
Next: Get started by Creating an app....