Page 1 of 1

Omero web "partially" works

PostPosted: Tue Nov 17, 2015 1:28 pm
by phm
Hi,

When I try to connect to my Omero web site I get the Omero login page. However, after clicking on the login button, I have "connection refused". I notice that the url for login page is in https and after login it passe to http. If I add https to it I can acces to the Omero web page.

omero nginx conf in /etc/nginx/conf.d

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

server {
listen 80;
server_name omero.college-de-france.fr;
rewrite ^ https://$server_name$request_uri? permanent;
}

server {

listen 443 default ssl;

server_name omero.college-de-france.fr;
keepalive_timeout 70;
ssl on;
ssl_certificate /etc/nginx/omero.college-de-france.fr.crt;
ssl_certificate_key /etc/nginx/omero.college-de-france.fr.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;

sendfile on;
client_max_body_size 0;

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

# weblitz django apps serve media from here
location /omero/static {
alias /opt/OMERO.server/lib/python/omeroweb/static;
}
location @proxy_to_app_omero {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;

proxy_pass http://omeroweb_omero;
}

location /omero {

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

}



default nginx conf in /etc/nginx/conf.d

server {
listen 80;
server_name localhost;

#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


Should I remove defaut.conf ?
Philippe

Re: Omero web "partially" works

PostPosted: Wed Nov 18, 2015 9:48 am
by manics
Hi Philippe

I can't see anything obviously wrong with your config. Could you try clearing your browser cache, and retry?

Re: Omero web "partially" works

PostPosted: Wed Nov 18, 2015 10:38 am
by phm
manics wrote:Hi Philippe

I can't see anything obviously wrong with your config. Could you try clearing your browser cache, and retry?


Hi Manics

Same problem after clearing cache navigator.
The strange thing is that the https url after omero login page becomes http and if I replace by https I have the Omero web page. That is the same thing if I click in Admin tab in the Omero page.


Philippe

Re: Omero web "partially" works

PostPosted: Wed Nov 18, 2015 12:25 pm
by atarkowska
Hi Philippe

Could you try adding

Code: Select all
location @proxy_to_app {
        ...
        proxy_set_header X-Forwarded-Proto $scheme;


Ola

Re: Omero web "partially" works

PostPosted: Wed Nov 18, 2015 3:51 pm
by phm
atarkowska wrote:Hi Philippe

Could you try adding

Code: Select all
location @proxy_to_app {
        ...
        proxy_set_header X-Forwarded-Proto $scheme;


Ola

Hi Ola,

Thanks, it's works now.

Philippe

Re: Omero web "partially" works

PostPosted: Thu Nov 19, 2015 4:34 pm
by atarkowska
Hi Philippe,

Thank for point it out. I have just fixed our templates https://github.com/openmicroscopy/openm ... /pull/4341

Ola