作者官方网站:http://www.wxl568.cn
worker_processes 1;
error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include /app/nginx/conf/healcheck.conf;
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 60;
#gzip
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
gzip_proxied any;
server {
listen 8080;
server_name localhost;
access_log logs/access.log main;
#域名解析的页面文件
location / {
root html/chap;
index index.html index.htm;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp3|mp4)$ {
expires 30d;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /jwt/ {
# 转发请求到后端服务网关
proxy_pass http://pmp-int-apigw.intsit.sfdc.com.cn:8765/jwt/;
}
location /api/ {
proxy_pass http://pmp-int-apigw.intsit.sfdc.com.cn:8765/api/;
}
}
}