-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-dhis2.conf
executable file
·61 lines (46 loc) · 1.29 KB
/
nginx-dhis2.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
user www-data;
worker_processes auto;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
# connection limit zones
limit_conn_zone $server_name zone=dvsconn:10m;
# rate limit zones
limit_req_zone $binary_remote_addr zone=ip:10m rate=4r/m;
limit_req_zone $server_name zone=all:10m rate=20r/m;
# performance log format
log_format performance '$remote_addr\t[$time_local]\t-\t$remote_user\t'
'"$request"\t$status\t$body_bytes_sent\t'
'"$http_referer"\t"$http_user_agent"\t'
'$upstream_response_time';
index index.html index.htm;
# Include separate files in the main "http{}" configuration
include conf.d/*.conf;
# Allow status requests from localhost
server
{
listen 127.0.0.1;
server_name localhost;
access_log /var/log/nginx/perf.log performance;
location /nginx_status {
stub_status on; # activate stub_status module
access_log off;
allow 127.0.0.1; # localhost
allow ::1; # localhost
deny all;
}
}
# Main server block
server {
listen 80;
server_name FQDN;
# Includes for the default hostname
include default.d/*.conf;
include upstream/*.conf;
}
}