-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.non-root.conf
76 lines (60 loc) · 2.11 KB
/
nginx.non-root.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
worker_processes 1;
user nobody nobody;
error_log /dev/stdout;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
# Set an array of temp and cache files options that otherwise defaults to
# restricted locations accessible only to root.
client_body_temp_path /tmp/client_body;
fastcgi_temp_path /tmp/fastcgi_temp;
proxy_temp_path /tmp/proxy_temp;
scgi_temp_path /tmp/scgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
include /etc/nginx/mime.types;
default_type application/octet-stream;
types_hash_max_size 2048;
server {
listen 80;
root /usr/share/nginx/html;
access_log /dev/stdout;
error_log /dev/stdout;
sendfile on;
default_type application/octet-stream;
gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 256;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 9;
sub_filter_once off;
sub_filter 'server_hostname' '$hostname';
sub_filter 'server_address' '$server_addr:$server_port';
sub_filter 'server_url' '$request_uri';
sub_filter 'remote_addr' '$remote_addr:$remote_port';
sub_filter 'server_date' '$time_local';
sub_filter 'client_browser' '$http_user_agent';
sub_filter 'request_id' '$request_id';
sub_filter 'nginx_version' '$nginx_version';
sub_filter 'document_root' '$document_root';
sub_filter 'proxied_for_ip' '$http_x_forwarded_for';
location / {
try_files $uri $uri/ /index.html =404;
}
location /healthcheck {
access_log off;
default_type application/json;
return 200 '{"response_status":200,"data":"alive"}';
}
location /nginx_status {
access_log off;
stub_status on;
allow 127.0.0.1;
deny all;
}
}
}