forked from sourcegraph/deploy-sourcegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.ConfigMap.yaml
65 lines (56 loc) · 1.97 KB
/
nginx.ConfigMap.yaml
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
apiVersion: v1 # for versions before 1.9.0 use apps/v1beta2
kind: ConfigMap
metadata:
name: nginx-config
labels:
deploy: nginx
data:
nginx.conf: |-
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
server_tokens off;
# SAML redirect response headers are sometimes large
proxy_buffer_size 128k;
proxy_buffers 8 256k;
proxy_busy_buffers_size 256k;
ssl_certificate /etc/nginx/tls.crt;
ssl_certificate_key /etc/nginx/tls.key;
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
ssl_protocols TLSv1.1 TLSv1.2;
access_log off;
upstream backend {
# Do not remove. The contents of sourcegraph_backend.conf can change
# between versions and may include improvements to the configuration.
server 127.0.0.1:8080;
}
server {
# Do not remove. The contents of sourcegraph_server.conf can change
# between versions and may include improvements to the configuration.
client_max_body_size 150M;
listen 4443 ssl;
location / {
proxy_pass http://sourcegraph-frontend:30080;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# SAML redirect response headers are sometimes large
proxy_buffer_size 128k;
proxy_buffers 8 256k;
proxy_busy_buffers_size 256k;
}
}
}
tls.crt: |-
-----BEGIN CERTIFICATE-----
REPLACE WITH YOUR CERTIFICATE
-----END CERTIFICATE-----
tls.key: |-
-----BEGIN PRIVATE KEY-----
REPLACE WITH YOUR PRIVATE KEY
-----END PRIVATE KEY-----