Skip to content

Instantly share code, notes, and snippets.

@Double1996
Created September 11, 2019 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Double1996/dbb0320c28f6b6c2aabcd5c7a6a4fba6 to your computer and use it in GitHub Desktop.
Save Double1996/dbb0320c28f6b6c2aabcd5c7a6a4fba6 to your computer and use it in GitHub Desktop.
nginx
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