Created
September 11, 2019 12:06
-
-
Save Double1996/dbb0320c28f6b6c2aabcd5c7a6a4fba6 to your computer and use it in GitHub Desktop.
nginx
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 / { | |
root /usr/share/nginx/html; | |
proxy_pass http://127.0.0.1:3000; | |
proxy_set_header Host $host:80; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Via "nginx"; | |
} | |
} | |
server { | |
listen 80; | |
server_name p.postmsg.cn; | |
location / { | |
proxy_pass http://127.0.0.1:8008; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
#access_log logs/p_access.log; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment