Skip to content

Instantly share code, notes, and snippets.

@jsturtevant
Last active September 23, 2019 19:59
Show Gist options
  • Save jsturtevant/b332e8cad08391da215a361a120841ea to your computer and use it in GitHub Desktop.
Save jsturtevant/b332e8cad08391da215a361a120841ea to your computer and use it in GitHub Desktop.
nginx configuration for local oh services
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#keepalive_timeout 0;
keepalive_timeout 65;
server {
listen 8001;
#server_name my_site.local;
location /api/user {
proxy_set_header Host $host;
proxy_pass http://userprofile;
}
location /api/trips {
proxy_set_header Host $host;
proxy_pass http://trips;
}
location /api/poi {
proxy_set_header Host $host;
proxy_pass http://poi;
}
location /api/user-java {
proxy_set_header Host $host;
proxy_pass http://user-java;
}
location / {
proxy_set_header Host $host;
proxy_pass http://tripviewer;
}
}
}
docker run --network customnw --name nginx -p 8001:8001 -v /c/projects/nginx.conf:/etc/nginx/nginx.conf -d nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment