-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
36 lines (30 loc) · 887 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
33
34
35
36
worker_processes 1;
daemon off;
error_log <%= ENV["APP_ROOT"] %>/nginx/logs/error.log;
events { worker_connections 1024; }
http {
log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent';
access_log <%= ENV["APP_ROOT"] %>/nginx/logs/access.log cloudfoundry;
default_type application/octet-stream;
include mime.types;
sendfile on;
gzip on;
tcp_nopush on;
keepalive_timeout 30;
resolver 127.0.0.1 valid=300s;
upstream backend {
least_conn;
server libertytesting123.mybluemix.net:80;
server libertytesting123.mybluemix.net:80;
}
server {
listen <%= ENV["PORT"] %>;
server_name mybluemix.net;
location /api/ {
#resolver 8.8.8.8 valid=300s;
#resolver_timeout 10s;
proxy_set_header Host libertytesting123.mybluemix.net;
proxy_pass http://backend/;
}
}
}