Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # /etc/nginx/nginx.conf
- user nginx;
- worker_processes 4;
- worker_cpu_affinity 0001 0010 0100 1000;
- worker_rlimit_nofile 131072;
- timer_resolution 100ms;
- worker_priority -10;
- # Enables the use of JIT for regular expressions to speed-up their processing.
- pcre_jit on;
- # Configures default error logger.
- error_log /tmp/error.log info;
- #error_log syslog:server=unix:/dev/log,nohostname,tag=nginx_error warn;
- # Includes files with directives to load dynamic modules.
- include /etc/nginx/modules/*.conf;
- events {
- # The maximum number of simultaneous connections that can be opened by
- # a worker process.
- worker_connections 32768;
- use epoll;
- accept_mutex on;
- multi_accept on;
- }
- http {
- # enable WS via reverse proxy
- map $http_upgrade $connection_upgrade {
- default upgrade;
- '' close;
- }
- # client_body_temp_path /run/nginx/client_body;
- # proxy_temp_path /run/nginx/proxy;
- #proxy_cache_path /run/nginx/proxy_cache ;
- # fastcgi_temp_path /run/nginx/fastcgi;
- # uwsgi_temp_path /run/nginx/uwsgi;
- # scgi_temp_path /run/nginx/scgi;
- # Includes mapping of file name extensions to MIME types of responses
- # and defines the default type.
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- # Name servers used to resolve names of upstream servers into addresses.
- # It's also needed when using tcpsocket and udpsocket in Lua modules.
- resolver 10.201.50.254;
- # Don't tell nginx version to clients.
- server_tokens off;
- # Specifies the maximum accepted body size of a client request, as
- # indicated by the request header Content-Length. If the stated content
- # length is greater than this size, then the client receives the HTTP
- # error code 413. Set to 0 to disable.
- client_max_body_size 100m;
- # Timeout for keep-alive connections. Server will close connections after
- # this time.
- keepalive_timeout 15;
- keepalive_requests 10000;
- # Sendfile copies data between one FD and other from within the kernel,
- # which is more efficient than read() + write().
- sendfile on;
- # Don't buffer data-sends (disable Nagle algorithm).
- # Good for sending frequent small bursts of data in real time.
- tcp_nodelay on;
- # Causes nginx to attempt to send its HTTP response head in one packet,
- # instead of using partial frames.
- tcp_nopush on;
- # Enable gzipping of responses.
- gzip on;
- # Set the Vary HTTP header as defined in the RFC 2616.
- gzip_vary on;
- # Enable checking the existence of precompressed files.
- gzip_static on;
- # Specifies the main log format.
- # log_format main '$http_x_forwarded_for - $remote_user [$time_local] "$request" '
- # '$status $body_bytes_sent "$http_referer" '
- # '"$http_user_agent" "$http_x_forwarded_for"';
- log_format main '[front] [host:$http_host] $remote_addr - $remote_user [$time_iso8601] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for" $request_id ';
- log_format upstream '$remote_addr - $remote_user [$time_iso8601] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for" $request_id '
- 'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';
- # Sets the path, format, and configuration for a buffered log write.
- # access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_access main;
- access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_access main;
- # Includes virtual hosts configs.
- # proxy_headers_hash_max_size 1024;
- # proxy_headers_hash_bucket_size 256;
- include /etc/nginx/conf.d/*.conf;
- }
Add Comment
Please, Sign In to add comment