123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316 |
- user nginx nginx;
- worker_processes auto;
- worker_rlimit_nofile 65535;
- pid /run/nginx.pid;
- events {
-
- worker_connections 20480;
-
-
-
-
- use epoll;
-
- multi_accept on;
- }
- # HTTP config module
- http {
-
- charset utf-8,gbk;
-
-
-
-
-
-
-
-
- include mime.types;
-
-
- default_type application/octet-stream;
-
-
-
- log_escape_non_ascii off;
-
- log_format main '$remote_addr - $remote_user [$time_iso8601] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for" "$request_time" "$upstream_addr" "$upstream_response_time" "$request_body" "$host"';
- log_format real_ip '$remote_addr - $remote_user [$time_local] $request_time "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '$http_user_agent $http_x_forwarded_for';
-
- log_format post_log '$remote_addr - $remote_user [$time_local] $request_time "$request" '
- '$status $body_bytes_sent "$request_body" "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for" ';
-
- access_log /usr/local/openresty/nginx/logs/access.log;
-
- error_log /usr/local/openresty/nginx/logs/error.log;
-
-
-
-
-
- sendfile on;
-
-
-
- tcp_nopush on;
-
-
-
- tcp_nodelay on;
-
-
- keepalive_timeout 30s;
-
-
-
-
-
-
- gzip on;
-
-
-
- gzip_http_version 1.0;
-
-
-
- gzip_comp_level 2;
-
-
- gzip_proxied any;
-
-
-
-
- gzip_min_length 1k;
-
-
-
- gzip_types text/plain application/x-javascript text/css application/xml;
-
-
-
-
-
- gzip_vary on;
-
-
-
- gzip_buffers 4 16k;
-
-
-
-
-
-
- large_client_header_buffers 4 4k;
-
- client_max_body_size 20m;
-
- client_header_buffer_size 4k;
-
-
-
-
-
-
- open_file_cache off;
-
-
-
-
-
-
-
-
-
-
- fastcgi_connect_timeout 300;
- fastcgi_send_timeout 300;
- fastcgi_read_timeout 300;
- fastcgi_buffer_size 64k;
- fastcgi_buffers 16 64k;
-
-
-
-
- add_header rt-Fastcgi-Cache $upstream_cache_status;
- fastcgi_cache_path /usr/local/openresty/nginx/cache/fastcgi_cache/ levels=2:2 keys_zone=cgi_cache:10m inactive=2h max_size=2g;
- fastcgi_cache_key "$scheme$request_method$host$request_uri";
- fastcgi_cache_use_stale error timeout invalid_header http_500;
- fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
-
-
-
-
-
-
- proxy_cache_path /usr/local/openresty/nginx/cache/proxy_cache/ levels=2:2 keys_zone=cgi_proxy:10m inactive=2h max_size=2g;
-
-
-
-
- proxy_temp_path /usr/local/openresty/nginx/cache/temp_path/ 1 2;
- proxy_temp_file_write_size 128k;
- proxy_max_temp_file_size 0;
-
-
- proxy_connect_timeout 30s;
-
-
-
- proxy_send_timeout 30s;
- proxy_read_timeout 30s;
-
- proxy_buffer_size 128k;
-
-
-
- proxy_buffering on;
-
-
- proxy_buffers 100 128k;
-
-
-
- proxy_busy_buffers_size 128k;
-
-
- include vhost/*.conf;
- include vhost/pay/development/*.conf;
- include vhost/pay/test/*.conf;
- include vhost/pay/production/*.conf;
-
-
-
-
-
-
-
-
-
- {% if java_backend_upstream is defined %}
- {{ java_backend_upstream }}
- {% else %}
- upstream java_443_backend {
-
- server 10.30.148.149:50443 weight=30;
- server 10.31.74.200:50443 weight=30;
- }
- upstream java_8080_backend {
-
- server 10.30.148.149:58080 weight=30;
- server 10.31.74.200:58080 weight=30;
- }
- {% endif %}
- upstream opscenter_backend {
- server 10.31.74.200:8888;
- }
- upstream jenkins_backend {
- server 10.31.88.120:8080;
- }
- upstream php_online_backend_http {
- server 10.28.225.116:80;
- ip_hash;
- }
- upstream php_online_backend_https {
- server 10.28.225.116:443;
- ip_hash;
- }
- upstream php_test_online_backend_http{
- server 10.28.81.15:80;
- }
- include deny.ip;
-
-
-
- }
|