diff options
author | Areli, Fuss (af732p) <af732p@intl.att.com> | 2018-09-12 16:28:11 +0300 |
---|---|---|
committer | Areli, Fuss (af732p) <af732p@intl.att.com> | 2018-09-12 16:29:14 +0300 |
commit | 898f70552e8fa936df88bd4bc405f8f39e5c32f7 (patch) | |
tree | 0322366a67c486040209aad2a220d2ebe5c330fe /nginx/nginx.conf | |
parent | 8055d8cb676d8df36f8a616f3e296720e68f82c5 (diff) |
Add docker and replace application server
DCAE TOSCA APP add docker creation and
replace application server
Change-Id: I5d79994cb6b5b8bf18399ff65cbcfc84e6ec3958
Issue-ID: SDC-1756
Signed-off-by: Areli, Fuss (af732p) <af732p@intl.att.com>
Diffstat (limited to 'nginx/nginx.conf')
-rw-r--r-- | nginx/nginx.conf | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 363e205..4ab113a 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -1,30 +1,42 @@ -#user nginx; -worker_processes 1; -error_log logs/error.log; -error_log logs/error.log notice; -error_log logs/error.log info; +error_log /var/log/nginx/error.log debug; -pid nginx.pid; +http { + limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; -events { - worker_connections 4096; -} + client_body_temp_path /tmp/nginx 1 2; + proxy_temp_path /tmp/nginx-proxy; + fastcgi_temp_path /tmp/nginx-fastcgi; + uwsgi_temp_path /tmp/nginx-uwsgi; + scgi_temp_path /tmp/nginx-scgi; -http { + upstream tosca_server { + server unix:/run/gunicorn/tosca_server.sock fail_timeout=0; + } + server { - listen 8085; - server_name localhost; - charset utf-8r; + listen 8085 ; + charset utf-8; + client_max_body_size 75M; # adjust to taste + + access_log /var/log/nginx/nginx-access.log; location / { - include uwsgi_params; - uwsgi_pass unix:/run/uwsgi/tosca.sock; - + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $http_host; + proxy_redirect off; + + proxy_pass http://tosca_server; + + limit_req zone=one; } } +} #http +events { + worker_connections 4096; ## Default: 1024 } |