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