This repository was archived by the owner on Feb 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathnginx.conf
More file actions
executable file
·87 lines (70 loc) · 2.14 KB
/
nginx.conf
File metadata and controls
executable file
·87 lines (70 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
user www www;
pid /var/run/nginx.pid;
#debug|info|notice|warn|error|crit
error_log logs/error.log info;
worker_processes 1;
#worker_cpu_affinity 0001 0010 0100 1000;
worker_rlimit_nofile 10240;
events {
use epoll;
worker_connections 10240;
}
http {
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" '
'"$upstream_cache_status"';
access_log logs/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 60;
gzip on;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_http_version 1.1;
gzip_min_length 1k;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
open_file_cache max=10240 inactive=30s;
open_file_cache_valid 60s;
open_file_cache_min_uses 1;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
server_tokens off;
server_name_in_redirect off;
server_names_hash_bucket_size 128;
client_body_buffer_size 16k;
client_body_timeout 60;
client_header_buffer_size 2k;
large_client_header_buffers 4 8k;
client_header_timeout 60;
client_max_body_size 10m;
proxy_buffer_size 16k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
proxy_cache_path /var/tmp/nginx/cache levels=1:2 keys_zone=lanmp:32m inactive=1h max_size=512m;
proxy_connect_timeout 30;
proxy_ignore_headers Set-Cookie Cache-Control Expires;
proxy_read_timeout 60;
proxy_send_timeout 30;
proxy_temp_file_write_size 64k;
proxy_set_header Host $host;
proxy_set_header Accept-Encoding '';
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
upstream backend {
ip_hash;
server 127.0.0.1:8080;
}
include vhosts/*;
server {
listen 80 default;
return 500;
}
}