diff options
author | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2018-12-05 12:40:42 +0200 |
---|---|---|
committer | Stamatis Katsaounis <mokats@intracom-telecom.com> | 2019-03-08 09:08:27 +0000 |
commit | 5f20495d6e3ec984c4e86fd76399ddf0d042b336 (patch) | |
tree | 80b452fbd39b6e1968df4b5aa2a632659f50eceb /docker/nginx/sites-available/default-opnfv | |
parent | 90cb4dca7713f84154fe2ad4c2f5e7145560f3c7 (diff) |
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 <mokats@intracom-telecom.com>
Diffstat (limited to 'docker/nginx/sites-available/default-opnfv')
-rw-r--r-- | docker/nginx/sites-available/default-opnfv | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/docker/nginx/sites-available/default-opnfv b/docker/nginx/sites-available/default-opnfv new file mode 100644 index 0000000..f271fb4 --- /dev/null +++ b/docker/nginx/sites-available/default-opnfv @@ -0,0 +1,100 @@ +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 ~* /testapi-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/cvp { + proxy_pass http://lfnapi/api/v1/cvp; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + } + + location /api/v1/auth { + proxy_pass http://lfnapi/api/v1/auth; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + } + + location /api/v1/profile { + proxy_pass http://lfnapi/api/v1/profile; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + } + + location /api/v1/test { + proxy_pass http://lfnapi/api/v1/test; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + } + + location = /api/v1/results { + proxy_pass http://lfnapi/api/v1/results; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + } + + location ~* /api/v1/results/([a-zA-Z0-9]+) { + client_max_body_size 20m; + proxy_pass http://lfnapi/api/v1/results/$1; + proxy_set_header X-Real_IP $remote_addr; + proxy_set_header Host $host; + } + + location ~* /api/v1/suts/hardware/([a-zA-Z0-9\-]+) { + proxy_pass http://lfnapi/api/v1/suts/hardware/$1; + 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/testapi-ui; + expires 1d; + } + + error_page 413 =200 /413.json; + + location /413.json { + return 200 '{"msg": "Please upload a file less than 20MB.", "code": 413}'; + } + +} |