Skip to content

Instantly share code, notes, and snippets.

@matthewpick

matthewpick/nginx.conf

Last active Jan 30, 2016
Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

@matthewpick matthewpick commented Jan 30, 2016

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