-
Notifications
You must be signed in to change notification settings - Fork 33
/
nginx.conf
executable file
·130 lines (104 loc) · 3.38 KB
/
nginx.conf
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
error_log /dev/stdout ${NGINX_ERROR_LOG_LEVEL:-warn};
# Establish some environment variables for later use
env LAGOON_AUTOGENERATED_ROUTES;
env LAGOON_ENVIRONMENT_TYPE;
events {
worker_connections 1024;
multi_accept on;
use epoll;
}
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"';
access_log /dev/stdout main;
rewrite_log ${NGINX_REWRITE_LOG:-off};
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
add_header X-LAGOON $hostname always;
uninitialized_variable_warn off;
map_hash_max_size ${NGINX_HASH_MAP_SIZE:-64};
map_hash_bucket_size ${NGINX_HASH_BUCKET_SIZE:-64};
map $host$uri $redirectdomain {
include /etc/nginx/redirects-map.conf;
}
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_buffers 16 8k;
gzip_comp_level 1;
gzip_http_version 1.0;
gzip_min_length 10;
gzip_types
application/atom+xml
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.api+json
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-javascript
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
application/xml+rss
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/javascript
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/xml
text/x-component
text/x-cross-domain-policy;
client_max_body_size 2048m;
client_body_timeout 10s;
client_header_timeout 10s;
client_body_buffer_size 128k;
client_body_temp_path /tmp/client_temp;
proxy_redirect off;
proxy_max_temp_file_size 4096m;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 16k;
proxy_buffer_size 16k;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_headers_hash_bucket_size 64;
proxy_temp_path /tmp/proxy_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 192.168.0.0/16;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
port_in_redirect off;
root /app;
server {
listen 50000;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow 10.0.0.0/8;
allow 172.16.0.0/12;
allow 192.168.0.0/16;
deny all;
}
}
include /etc/nginx/conf.d/*.conf;
}