From 5f20495d6e3ec984c4e86fd76399ddf0d042b336 Mon Sep 17 00:00:00 2001 From: Stamatis Katsaounis Date: Wed, 5 Dec 2018 12:40:42 +0200 Subject: Prepare Web Portal for ONAP integration This patch applies all the required changes in order to support a second web portal container with the onap web portal content. Change-Id: I2f59776313bf2067dbdfb04445620b5241716ebb Signed-off-by: Stamatis Katsaounis --- docker/nginx/sites-available/default-onap | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docker/nginx/sites-available/default-onap (limited to 'docker/nginx/sites-available/default-onap') diff --git a/docker/nginx/sites-available/default-onap b/docker/nginx/sites-available/default-onap new file mode 100644 index 0000000..e6aecb1 --- /dev/null +++ b/docker/nginx/sites-available/default-onap @@ -0,0 +1,64 @@ +upstream lfnapi { + server lfnapi:8010; +} + +server { + listen 8000 default_server; + listen [::]:8000 default_server ipv6only=on; + + root /usr/share/nginx/html; + index index.html index.htm; + + server_name localhost; + + location ~* /onap-ui/ { + root /www/static; + expires 1d; + } + + location ~* /logs/.*\.(log|out|yaml|yml|txt|conf|json|sh|)$ { + root /home/testapi; + add_header Content-Type text/plain; + } + + location ~* /logs/.*/results { + root /home/testapi; + expires 1d; + autoindex on; + autoindex_exact_size off; + autoindex_localtime on; + } + + location ~* /logs/api { + root /home/testapi; + expires 1d; + autoindex on; + autoindex_exact_size on; + autoindex_localtime on; + } + + location = /api/v1/onap/results/upload { + client_max_body_size 20m; + proxy_pass http://lfnapi/api/v1/onap/results/upload; + proxy_set_header X-Real_IP $remote_addr; + proxy_set_header Host $host; + } + + location /api/v1/ { + proxy_pass http://lfnapi/api/v1/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + } + + location / { + root /www/static/onap-ui; + expires 1d; + } + + error_page 413 =200 /413.json; + + location /413.json { + return 200 '{"msg": "Please upload a file less than 20MB.", "code": 413}'; + } + +} -- cgit 1.2.3-korg