Skip to content

Instantly share code, notes, and snippets.

@matthewpick
Last active January 30, 2016 23:32
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 matthewpick/5513a469d3fa2f17683f to your computer and use it in GitHub Desktop.
Save matthewpick/5513a469d3fa2f17683f to your computer and use it in GitHub Desktop.
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
server_name site1.example.com;
# app1 reverse proxy follow
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.1.10:8080/;
}
}
server {
server_name site2.example.com;
# app1 reverse proxy follow
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.1.11:8080/;
}
}
include servers/*;
}
@matthewpick
Copy link
Author

Make sure to change site.example.com and 192.168.1.10:8080 to the proper path.

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