Skip to content

Instantly share code, notes, and snippets.

@tluyben
Created October 30, 2020 15:02
Show Gist options
  • Save tluyben/b33548e1a3b8ed120312369fa67fb522 to your computer and use it in GitHub Desktop.
Save tluyben/b33548e1a3b8ed120312369fa67fb522 to your computer and use it in GitHub Desktop.
Run openwhisk playground on a public IP address with Nginx
On the same server as OpenWhisk with the playground running, add the Nginx config;
server {
listen 443;
listen [::]:443;
server_name whisk.server.com;
location ~ /api/v1/* {
proxy_pass http://172.17.0.1:3233;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
break;
}
location / {
subs_filter_types *;
subs_filter 'http://172.17.0.1:3233' 'https://whisk.server.com';
proxy_pass http://172.17.0.1:3232;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $http_host;
proxy_set_header Accept-Encoding "";
proxy_cache_bypass $http_upgrade;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment