Omero web without subfolder

I managed to install omero following the instructions including the ssl. My question may be a bit silly but I would rather have omero web as the root page as my website is registered as omero.myinstitution.com so I don’t need the omero subfolder. I am no nginx expert and I couldn’t find a way to do this on web searchers. I am adding nginx.conf:
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

server {
    server_name  omero.mvls.gla.ac.uk;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/omero.mvls.gla.ac.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/omero.mvls.gla.ac.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
if ($host = omero.mvls.gla.ac.uk) {
return 301 https://$host$request_uri;
} # managed by Certbot

    server_name  omero.mvls.gla.ac.uk;
listen 80;
return 404; # managed by Certbot

}}

omero-web.conf
upstream omeroweb_omero {
server 127.0.0.1:4080 fail_timeout=0;
}

server {

listen 443;

 server_name omero.mvls.gla.ac.uk;

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/omero.mvls.gla.ac.uk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/omero.mvls.gla.ac.uk/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

sendfile on;
client_max_body_size 0;

# maintenance page serve from here
location @maintenance_omero {
    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_omero {
    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_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;
}

}

The default configuration doesn’t have /omero, see for example https://demo.openmicroscopy.org/
Can you run omero config get for OMERO.server and OMERO.web and show us the output? If you made changes to the OMERO.web config did you regenerate your Nginx config?

OMERO.server/bin/omero config get

omero.data.dir=/home/omero/OMERODIR/OMERO
omero.db.name=omero_odonto
omero.db.pass=********
omero.db.user=*********
omero.jvmcfg.percent.blitz=50
omero.web.application_server=wsgi-tcp
omero.web.prefix=/omero

OMERO.server/bin/omero web diagnostics

================================================================================
OMERO Diagnostics (web) 5.5.1-ice36-b122
================================================================================
        
OMERO.web status... [RUNNING] (PID 2046)
Django version: 1.8.19

Log dir:    /home/omero/OMERO.server/var/log exists
Log file :  OMEROweb.log                   704.0 KB      errors=0    warnings=31  

Yes, I did regenerate the Nginx config but I had to add the ssl data by hand on the omero-web.config (nginx keeps giving me an error that I have a duplicate server entry that is ignored). Sorry, I am not versed in the nginx configuration.

This configuration option means OMERO.web is run under the /omero prefix

So, do the solution would be…
OMERO.server/bin/omero config set omero.web.prefix ‘/’
and regenerate the config?
Do I need to do anything else?

You can unset it completely: omero config set omero.web.prefix, restart OMERO.web, and regenerate your Nginx config.

Thank you, it worked as a charm!