forked from IBM/CodeEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
32 lines (26 loc) · 999 Bytes
/
nginx.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
access_log /dev/stdout main;
server {
listen 8080 ;
server_name *.codeengine.appdomain.cloud ;
location / {
# Send request on to Application called "app"
# The "NS" will be replaced by the "call-nginx" script at runtime
proxy_pass http://auth-app.NS.svc.cluster.local ;
# We need the Host header to point to the right Application
proxy_set_header Host auth-app.NS.svc.cluster.local ;
# Set some other headers
proxy_set_header X-Real-IP $remote_addr ;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
# Websocket stuff
proxy_http_version 1.1 ;
proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "upgrade" ;
proxy_set_header X-Scheme $scheme ;
# Misc stuff
proxy_cache_bypass $http_upgrade ;
proxy_redirect off ;
# Setup our Basic Auth stuff
auth_basic "Protected Area" ;
auth_basic_user_file /etc/apache2/.htpasswd ;
}
}