Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@helloitsjoe
Created May 13, 2020 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helloitsjoe/9b5b86c06da6dfa6753f5e3c922d4809 to your computer and use it in GitHub Desktop.
Save helloitsjoe/9b5b86c06da6dfa6753f5e3c922d4809 to your computer and use it in GitHub Desktop.
Nginx config for Sentiment Analysis tutorial: https://rinormaloku.com/introduction-application-architecture/
server {
listen 80;
server_name localhost;
# Reverse proxy
location /sentiment/ {
proxy_pass http://sa-web-app-lb:8080/;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
@helloitsjoe
Copy link
Author

Nginx config that includes a reverse proxy for a backend service in the same kubernetes cluster. Two options for replacing the config in your nginx container:

  1. Use the Dockerfile to copy this file into your frontend (nginx) container's /etc/nginx/conf.d directory
  2. Use a kubernetes ContainerMap to copy this config file to your container (see here for an example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment