diff options
Diffstat (limited to 'docker/nginx/sites-available/default-onap')
-rw-r--r-- | docker/nginx/sites-available/default-onap | 64 |
1 files changed, 64 insertions, 0 deletions
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}'; + } + +} |