Last active
January 30, 2016 23:32
-
-
Save matthewpick/5513a469d3fa2f17683f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/*; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure to change
site.example.com
and192.168.1.10:8080
to the proper path.