kennethgillen wrote:Hi,
Have you created an https config section for nginx? Does it work if you try
http://localhost/omero/, without the 's'?
Thanks,
Kenny
Hi Kenny,
on the port 80 I get page not found
This is my nginx.conf file :
#######################################################################
#
# This is the main Nginx configuration file.
#
# More information about the configuration options is available on
# * the English wiki -
http://wiki.nginx.org/Main# * the Russian documentation -
http://sysoev.ru/nginx/#
#######################################################################
#----------------------------------------------------------------------
# Main Module - directives that cover basic functionality
#
#
http://wiki.nginx.org/NginxHttpMainModule#
#----------------------------------------------------------------------
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
#----------------------------------------------------------------------
# Events Module
#
#
http://wiki.nginx.org/NginxHttpEventsModule#
#----------------------------------------------------------------------
events {
worker_connections 1024;
}
#----------------------------------------------------------------------
# HTTP Core Module
#
#
http://wiki.nginx.org/NginxHttpCoreModule #
#----------------------------------------------------------------------
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
#
# The default server.
# To protect OMERO passwords, redirect all HTTP connections to use HTTPS.
#
server {
listen [::]:80;
return 301
https://$host$request_uri; }
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# Another server, for reporting OMERO status.
#
server {
listen 8000;
server_name _;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/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;
}
}
}
and my /etc/nginx/conf.d/omero-web.conf :
server {
listen 80;
server_name $hostname;
# weblitz django apps serve media from here
location /static {
alias /opt/OMERO.server/lib/python/omeroweb/static;
}
location /omero {
if (-f /opt/OMERO.server/var/maintenance.html) {
error_page 503 /maintenance.html;
return 503;
}
fastcgi_pass 0.0.0.0:4080;
fastcgi_split_path_info ^(/omero)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_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 /maintenance.html {
root /opt/OMERO.server/var;
}
}