Configure multiple host addresses

Hi

I am running OCIS 4.0.1 on a linux server in a docker environment (using the owncloud ocis image from docker hub) behind an nginx reverse proxy.
I wanted to make the server/the instance of ocis available through multiple domains, e.g. oc.xy.ch and oc.yz.ch (with each having its SSL certificate from lets encrypt).

Unfortunately, I don’t get it work, i.e. the domain oc.yz.ch is always forwarded to oc.xy.ch and I assume it is due to OCIS configuration, i.e. the OCIS_URL setting. OCIS environment variables in docker-compose.yaml are:

environment:
  - OCIS_URL=https://oc.xy.ch
  - OCIS_INSECURE=true
  - PROXY_TLS=false
  - PROXY_HTTP_ADDR=0.0.0.0:9200

To ensure that not nginx is the problem, here is the config for the server:

server {
listen 80;
server_name oc.xy.ch oc.yz.ch;

location /.well-known/acme-challenge/ {
    root /var/www/certbot;
}

location / {
    return 301 https://$host$request_uri;
}

}

server
{
listen 443 ssl http2;
listen [::]:443 ssl http2;

ssl_certificate /etc/nginx/ssl/live/oc.xy.ch/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/oc.xy.ch/privkey.pem;

ssl_protocols TLSv1.2 TLSv1.1 TLSv1;

server_name oc.xy.ch;

location / {
    proxy_pass http://ocis:9200/;
    proxy_set_header Host $host;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_redirect off;
    proxy_buffering off;
    client_max_body_size 0;
}

}

server
{
listen 443 ssl http2;
listen [::]:443 ssl http2;

ssl_certificate /etc/nginx/ssl/live/oc.yz.ch/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/oc.yz.ch/privkey.pem;

ssl_protocols TLSv1.2 TLSv1.1 TLSv1;

server_name oc.yz.ch;

location / {
    proxy_pass http://ocis:9200/;
    proxy_set_header Host $host;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_redirect off;
    proxy_buffering off;
    client_max_body_size 0;
}

}

Anybody having an idea why this is forwarded? How can I set multiple OCIS_URLs to the docker container?

Thanks a lot
rmk1138

This is not supported, ocis can only be run on one domain.

1 Like

Thanks for your response! Too bad, but maybe this will come later.

Can you please create an issue as feature-request at Issues · owncloud/ocis · GitHub ?
Please describe your use-case as detailed as possible so we can discuss this inside the team.

Thx

3 Likes