-
Notifications
You must be signed in to change notification settings - Fork 4
/
nginx-config.yml
55 lines (55 loc) · 1.74 KB
/
nginx-config.yml
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
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
nginx.config: |
user nginx;
worker_processes auto;
# set open fd limit to 30000
#worker_rlimit_nofile 10000;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 10240;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main
'remote_addr:$remote_addr\t'
'time_local:$time_local\t'
'method:$request_method\t'
'uri:$request_uri\t'
'host:$host\t'
'status:$status\t'
'bytes_sent:$body_bytes_sent\t'
'referer:$http_referer\t'
'useragent:$http_user_agent\t'
'forwardedfor:$http_x_forwarded_for\t'
'request_time:$request_time';
access_log /var/log/nginx/access.log main;
rewrite_log on;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
#include /etc/nginx/conf.d/*.conf; This must be commented out!
#upstream svc-aspnetcorewebapi {
# server svc-aspnetcorewebapi:5000;
# keepalive 1024;
#}
server {
listen 80;
access_log /var/log/nginx/app.access_log main;
error_log /var/log/nginx/app.error_log;
#set $restapi http://svc-web.default.svc.cluster.local:8080;
set $aspnetcorewebapi http://svc-aspnetcorewebapi.default.svc.cluster.local:5000/;
resolver kube-dns.kube-system valid=10s;
location /aspnetcorewebapi/ {
#proxy_pass http://svc-web;
proxy_pass $aspnetcorewebapi;
proxy_http_version 1.1;
}
}
}