Reverse Proxy for Multi Domain


We want to use multiple domains to point to the server. This is due to some reverse billing on data requirements we have.

Our problem is that in /opt/kaltura/nginx/conf/ssl.conf we added
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;

and on our Nginx reverse proxy we have:
server {
listen 443;
server_name public.domain;

    ssl_certificate /etc/ssl/certs/server.crt;
    ssl_certificate_key /etc/ssl/certs/server.key;

    location / {
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Proto $scheme;
            client_max_body_size 0;
           proxy_pass https://kulture.domain;


The return sites still redirect the video players and playlists back to the server domain, kulture.domain