Jump to: navigation, search

Orion/Terminal Administration Guide/Reverse Proxy Setup

< Orion‎ | Terminal Administration Guide
Revision as of 09:28, 14 February 2014 by Adrian.aichner.gmail.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

There are several administrative steps the system administrator needs to perform to setup the Reverse Proxy server for use with an Orion server and Docker server.

WebSocket proxying

The administrator needs to setup their reverse proxy server for WebSocket proxying. As an example, we follow WebSocket proxying for Nginx.

Here is a sample /etc/nginx/sites-available/default used by Nginx:

server {
 listen 80; 
 server_name prod.example.com;
 
 # proxy all to Orion Server
 location / {
   proxy_pass http://127.0.0.1:8080/;
 }     
 
 # proxy container attach to Docker Server for WebSocket to terminal
 location /containers {
   proxy_pass http://127.0.0.1:4243;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
 }     
 
 # proxy /version to Docker Server for debugging to see Docker server is running
 location /version {
   proxy_pass http://127.0.0.1:4243;
 }     
}

The first location is a proxy to send all traffic to the Orion server.

The second location is a proxy to send traffic for a WebSocket to a Docker container for a terminal.

Specify proxy in orion.conf

Since the browser client accesses the Docker server through a different URL than the orion server, we need to follow the specific instructions in Specify Docker Server in orion.conf

Debugging the configuration

The third location above is an addition to confirm that the configuration is correct. You will be able to test two URL: