From 898f70552e8fa936df88bd4bc405f8f39e5c32f7 Mon Sep 17 00:00:00 2001 From: "Areli, Fuss (af732p)" Date: Wed, 12 Sep 2018 16:28:11 +0300 Subject: 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) --- nginx/nginx.conf | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) (limited to 'nginx') 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 } -- cgit 1.2.3-korg