Page 1 of 1

help with ssl config

PostPosted: Thu Dec 08, 2016 11:46 am
by saleht
i configured a ssl connection in omero-web.config

upstream omeroweb {
server 127.0.0.1:4080 fail_timeout=0;
}


server {
listen 80;
server_name XXXXXXXX.de;

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 @proxy_to_app {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;

proxy_pass http://omeroweb;
}

location / {

error_page 502 @maintenance;
# checks for static file, if not found proxy to app
try_files $uri @proxy_to_app;
}

}

server {
listen 443 ssl;


server_name XXXXXXX.de;
sendfile on;


ssl on;
ssl_certificate "/etc/nginx/cert-8790497231994736132016860467.pem";
ssl_certificate_key "/etc/nginx/omero-cai.key";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
ssl_protocols SSLv2 SSLv3 TLSv1;

# 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 @proxy_to_app {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;

proxy_pass http://omeroweb;
}

}


when i requesting http it works fine, but using https it gives that green Lock that the connection is secure, but the omero webclient not appear, it gives welcome page of nginx,
any idea thx in advanced

Re: help with ssl config

PostPosted: Thu Dec 08, 2016 12:52 pm
by saleht
i fixed now thx anyway i forget to wirt this
location / {

error_page 502 @maintenance;
# checks for static file, if not found proxy to app
try_files $uri @proxy_to_app;
}

Re: help with ssl config

PostPosted: Thu Dec 08, 2016 8:17 pm
by mtbc
We're glad it's working for you! Thank you for letting us know how you fixed it.

Cheers,
Mark