Skip to content

Instantly share code, notes, and snippets.

@srvstream
Created October 7, 2018 01:11
Show Gist options
  • Save srvstream/76eaf05ea603de6eb53f3d2f38ecd720 to your computer and use it in GitHub Desktop.
Save srvstream/76eaf05ea603de6eb53f3d2f38ecd720 to your computer and use it in GitHub Desktop.
Nginx reverse proxy for the RESTful API
server {
listen 443;
ssl on;
ssl_certificate /usr/local/etc/pki/server.crt;
ssl_certificate_key /usr/local/etc/pki/server.key;
server_name myhost.local;
location /wapi {
proxy_cookie_domain ~ my-infoblox-gm.local;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://my-infoblox-gm.local/wapi/v2.6;
}
location / {
root /var/www/myhost.local;
index index.html index.htm;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment