Ticket #2315: nginx-defaul.conf

File nginx-defaul.conf, 2.9 KB (added by duttab49@…, 4 years ago)

default nginx config

Line 
1user nginx;
2worker_processes auto;
3error_log /var/log/nginx/error.log;
4pid /run/nginx.pid;
5# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
6include /usr/share/nginx/modules/*.conf;
7events {
8 worker_connections 1024;
9}
10http {
11 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
12 '$status $body_bytes_sent "$http_referer" '
13 '"$http_user_agent" "$http_x_forwarded_for" '
14 'upstream_addr=$upstream_addr upstream_status=$upstream_status '
15 'request_time=$request_time urt=$upstream_response_time '
16 'uct=$upstream_connect_time uht=$upstream_header_time';
17
18 access_log /var/log/nginx/access.log main;
19 sendfile on;
20 tcp_nopush on;
21 tcp_nodelay on;
22
23 server_tokens off;
24
25 # Sets the maximum allowed size of the client request body.
26 client_max_body_size 130M;
27
28 # Sets a timeout during which a keep-alive client connection will stay open on the server side.
29 # The zero value disables keep-alive client connections.
30 keepalive_timeout 4000;
31 types_hash_max_size 4096;
32 proxy_read_timeout 4000;
33 proxy_connect_timeout 4000;
34 proxy_send_timeout 4000;
35
36 # Defines a timeout for reading client request header.
37 # If a client does not transmit the entire header within this time, the request is terminated with the 408 (Request Time-out) error.
38 client_header_timeout 4000;
39 server_names_hash_bucket_size 256;
40
41 # Defines a timeout for reading client request body.
42 # The timeout is set only for a period between two successive read operations, not for the transmission of the whole request body.
43 # If a client does not transmit anything within this time, the request is terminated with the 408 (Request Time-out) error.
44 client_body_timeout 4000;
45 include /etc/nginx/mime.types;
46 default_type application/octet-stream;
47
48 # Load modular configuration files from the /etc/nginx/conf.d/tenantID-envType/ directory.
49 include /etc/nginx/conf.d/*/*.conf;
50
51 upstream upstream_balancer {
52 server 0.0.0.1; # placeholder
53 keepalive 256;
54 keepalive_timeout 4000s;
55 # Sets the maximum number of requests that can be served through one keep-alive connection.
56 # After the maximum number of requests are made, the connection is closed.
57 keepalive_requests 100;
58 }
59
60 server {
61 listen 8080;
62 server_name _;
63 root /usr/share/nginx/html;
64 # Load configuration files for the default server block.
65 include /etc/nginx/default.d/*.conf;
66 error_page 404 /404.html;
67 location = /40x.html {
68 }
69 error_page 500 502 503 504 /50x.html;
70 location = /50x.html {
71 }
72 }
73}