This repository was archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhttp.conf
More file actions
90 lines (76 loc) · 4.11 KB
/
Copy pathhttp.conf
File metadata and controls
90 lines (76 loc) · 4.11 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
88
89
90
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
map "" $site_root {
default _SITE_ROOT_;
}
map "" $server_root {
default _GBC_CORE_ROOT_;
}
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache_gateway:100m inactive=24h max_size=1g;
map $http_x_forwarded_for $realip {
~^(\d+\.\d+\.\d+\.\d+) $1; # IPv4
~*([A-F0-9:]*) $1; # Very relaxed IPv6 regex
default $remote_addr;
}
geoip2 _GBC_CORE_ROOT_/geoip/GeoIP2-City.mmdb {
auto_reload 60m;
$db_timestamp metadata build_epoch;
$db_last_check metadata last_check;
$db_last_change metadata last_change;
$continent_id source=$realip continent geoname_id;
$continent_code source=$realip continent code;
$continent_name source=$realip continent names en;
$country_id source=$realip country geoname_id;
$country_code source=$realip country iso_code;
$country_name source=$realip country names en;
$city_id source=$realip city geoname_id;
$city_name source=$realip city names en;
$location_acc source=$realip location accuracy_radius;
$location_lat source=$realip location latitude;
$location_lon source=$realip location longitude;
$location_timezone source=$realip location time_zone;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
map $host $resp_body {
default '';
}
vhost_traffic_status_zone shared:vhost_traffic_status:32m;
vhost_traffic_status_dump _GBC_CORE_ROOT_/db/gateway/vts_gw.db;
log_format main_json escape=json '{' '"msec": "$msec", ' '"connection": "$connection", ' '"connection_requests": "$connection_requests", ' '"pid": "$pid", ' '"request_id": "$request_id", ' '"request_length": "$request_length", ' '"remote_addr": "$remote_addr", ' '"remote_user": "$remote_user", ' '"remote_port": "$remote_port", ' '"time_local": "$time_local", ' '"time_iso8601": "$time_iso8601", ' '"request": "$request", ' '"request_uri": "$request_uri", ' '"args": "$args", ' '"status": "$status", ' '"body_bytes_sent": "$body_bytes_sent", ' '"bytes_sent": "$bytes_sent", ' '"http_referer": "$http_referer", ' '"http_user_agent": "$http_user_agent", ' '"http_x_forwarded_for": "$http_x_forwarded_for", ' '"http_host": "$http_host", ' '"server_name": "$server_name", ' '"request_time": "$request_time", ' '"upstream": "$upstream_addr", ' '"upstream_connect_time": "$upstream_connect_time", ' '"upstream_header_time": "$upstream_header_time", ' '"upstream_response_time": "$upstream_response_time", ' '"upstream_response_length": "$upstream_response_length", ' '"upstream_cache_status": "$upstream_cache_status", ' '"ssl_protocol": "$ssl_protocol", ' '"ssl_cipher": "$ssl_cipher", ' '"scheme": "$scheme", ' '"request_method": "$request_method", ' '"server_protocol": "$server_protocol", ' '"pipe": "$pipe", ' '"gzip_ratio": "$gzip_ratio", ' '"request_body": "$request_body", ' '"response_body": "$resp_body", ' '"http_cf_ray": "$http_cf_ray", ' '"real_ip": "$http_x_forwarded_for",' '"tcpinfo_rtt": "$tcpinfo_rtt",' '"tcpinfo_rttvar": "$tcpinfo_rttvar"' '}';
server {
listen 80;
server_name massbitroute.com *.massbitroute.com;
listen 443 ssl;
ssl_certificate _SITE_ROOT_/ssl/live/massbitroute.com/fullchain.pem;
ssl_certificate_key _SITE_ROOT_/ssl/live/massbitroute.com/privkey.pem;
# set $site_root _SITE_ROOT_;
# set _GBC_CORE_ROOT_ _GBC_CORE_ROOT_;
set $redis_sock _GBC_CORE_ROOT_/tmp/redis.sock;
root _SITE_ROOT_/public;
location /__internal_prometheus/ {
# limit_except GET {
# deny all;
# }
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $remote_addr;
proxy_pass_request_headers on;
proxy_pass http://127.0.0.1:9090/__internal_prometheus/;
}
location /__internal_status_vhost/ {
include _SITE_ROOT_/http.d/gateway/etc/_vts_server.conf;
}
location / {
index index.html;
}
# _INCLUDE_APPS_ENTRY_
}
include _SITE_ROOT_/db/gateway/conf.d/*.conf0;
include _SITE_ROOT_/db/gateway/conf.d/*.conf;
include _SITE_ROOT_/db/gateway/conf.d/*.conf9;