123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- user nginx;
- worker_processes auto;
- error_log /var/log/nginx/error.log notice;
- pid /var/run/nginx.pid;
- events {
- worker_connections 4096;
- }
- http {
- include /etc/nginx/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"';
- map $http_upgrade $connection_upgrade {
- default upgrade;
- '' close;
- }
- access_log /var/log/nginx/access.log main;
- sendfile on;
- #tcp_nopush on;
- client_max_body_size 50m;
- keepalive_timeout 65;
- #gzip on;
- server_tokens off;
- map $http_origin $allow_origin {
- default "";
- "~^(https?://localhost(:[0-9]+)?)$" $1;
- "~^(https?://127.0.0.1(:[0-9]+)?)$" $1;
- "~^(https?://172.10(.[\d]+){2}(:[0-9]+)?)$" $1;
- "~^(https?://192.168(.[\d]+){2}(:[0-9]+)?)$" $1;
- "~^(http://msa.js.sgcc.com.cn:6001)$" $1;
- "~^(http://20.47.197.214:9098)$" $1;
- "~^(http://21.47.224.120:19098)$" $1;
- }
- include /etc/nginx/conf.d/*.conf;
- }
|