Skip to content

Instantly share code, notes, and snippets.

@jak119
Created June 23, 2016 18:26
Show Gist options
  • Save jak119/4becbf293226e0be93e599ed22ff08cd to your computer and use it in GitHub Desktop.
Save jak119/4becbf293226e0be93e599ed22ff08cd to your computer and use it in GitHub Desktop.
Brightcove Gallery Reverse Proxy
  1. Add a series of location blocks for the required URIs while being sure to replace XXXX with the proper subdomain as provided by the Gallery

    location /templates/ {
        proxy_pass http://XXXX.bcvp0rtal.com/templates/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $proxy_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    
    location /common-assets/ {
        proxy_pass http://XXXX.bcvp0rtal.com/common-assets/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $proxy_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    
    location /shared/ {
        proxy_pass http://XXXX.bcvp0rtal.com/shared/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $proxy_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    
  2. Create a gallery and assign it the URI you'd like /test in this example

  3. In the Nginx config add a location block for that URI

    location /test/ {
        proxy_pass http://XXXX.bcvp0rtal.com/test/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $proxy_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment