Created
December 27, 2017 07:40
-
-
Save zhaoxiaobao/6ae49a0d33d0f3e7ade66ceed857561e to your computer and use it in GitHub Desktop.
nginx-proxy_pass
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; | |
listen [::]:80 default_server; | |
server_name _; | |
root /usr/share/nginx/html; | |
# Load configuration files for the default server block. | |
include /etc/nginx/default.d/*.conf; | |
location / { | |
#proxy_set_header X-Real-IP $remote_addr; | |
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
#proxy_set_header Host $http_host; | |
#proxy_set_header X-Nginx-Proxy true; | |
#proxy_set_header Connection ""; | |
proxy_pass http://127.0.0.1:9000; | |
#proxy_redirect default; | |
# index index.html index.htm; | |
} | |
location /demo/ { | |
#proxy_set_header X-Real-IP $remote_addr; | |
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
#proxy_set_header Host $http_host; | |
#proxy_set_header X-Nginx-Proxy true; | |
#proxy_set_header Connection ""; | |
proxy_pass http://127.0.0.1:3000/; | |
#proxy_redirect default; | |
# index index.html index.htm; | |
} | |
location /easymock/ { | |
#proxy_set_header X-Real-IP $remote_addr; | |
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
#proxy_set_header Host $http_host; | |
#proxy_set_header X-Nginx-Proxy true; | |
#proxy_set_header Connection ""; | |
proxy_pass http://127.0.0.1:7300/; | |
#proxy_redirect default; | |
# index index.html index.htm; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment