Last active
August 29, 2015 14:10
-
-
Save cbliard/b8f9b994b502b73d0035 to your computer and use it in GitHub Desktop.
Nginx reverse proxy
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
proxy_set_header Host $http_host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; |
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
server { | |
listen 80 default_server; | |
server_name svn.example.com; | |
location / { | |
include proxy_params; | |
# internal address for svn | |
proxy_pass http://localhost:8000; | |
proxy_redirect http://$host:8000 http://$host; | |
} | |
} | |
server { | |
listen 80; | |
server_name jenkins.example.com; | |
location / { | |
include proxy_params; | |
# internal address for jenkins | |
proxy_pass http://localhost:8080; | |
proxy_redirect http://$host:8080 http://$host; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment