Created
October 30, 2020 15:02
-
-
Save tluyben/b33548e1a3b8ed120312369fa67fb522 to your computer and use it in GitHub Desktop.
Run openwhisk playground on a public IP address with Nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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