#user xfs xfs; worker_processes 1; error_log logs/error.log warn; pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; upstream iui { server 127.0.0.1:8202; } upstream nsoc { server 127.0.0.1:8203; } upstream roc { server 127.0.0.1:8204; } upstream umc { server 127.0.0.1:8205; } upstream ssh { server 127.0.0.1:8209; } upstream yamlparser { server 127.0.0.1:8210; } upstream dac { server 127.0.0.1:8206; } upstream cmcc { server 127.0.0.1:8207; } upstream tacker { server 127.0.0.1:8208; } upstream winery { server 127.0.0.1:8080; } upstream etsi { server 127.0.0.1:8211; } upstream openstackadapter { server 127.0.0.1:8217; } upstream vimadapter { server 127.0.0.1:8218; } upstream odlsdn { server 127.0.0.1:8216; } # Basic Settings default_type application/octet-stream; sendfile on; tcp_nopush on; server_names_hash_bucket_size 128; keepalive_timeout 120s; #the maximum allowed size of the client request body,current 10G client_max_body_size 10240m; client_body_buffer_size 128k; #set the time wait for connect to proxy_pass target,avoid waiting too long proxy_connect_timeout 10s; proxy_read_timeout 120s; proxy_send_timeout 120s; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; proxy_buffers 4 32k; #set the nginx_cache parameter #proxy_cache_path temp/proxy_cache levels=1:2 keys_zone=nginx_cache:10m inactive=1d max_size=100m; # Logging access_log off; # Lua settings lua_package_path "$prefix/../lualib/?.lua;;"; lua_package_cpath "$prefix/../lualib/?.so;;"; lua_shared_dict ceryx 10M; lua_code_cache on; server { listen 80; default_type text/html; location = / { rewrite ^ /iui/framework redirect; } location = /openo { rewrite ^ /iui/framework redirect; } location = /iui/openo { rewrite ^ /iui/framework redirect; } location = /iui/framework/login.html { access_by_lua_file luaext/iui_auth.lua; proxy_pass http://iui; } location = /api/uiframe/v1/login { rewrite ^ /api/umcsm/v1/login break; proxy_pass http://umc; header_filter_by_lua_file luaext/login.lua; } location = /api/uiframe/v1/loginOut { access_by_lua_file luaext/logout.lua; rewrite ^ /api/umcsm/v1/loginOut break; proxy_pass http://umc; } location = /api/hsif/v1/authentication { access_by_lua_file luaext/make_authed.lua; } location /iui { access_by_lua_file luaext/iui_auth.lua; proxy_pass http://iui; } location ~ ^/api/(?:vim|nsoc)/v1 { access_by_lua_file luaext/auth.lua; proxy_pass http://nsoc; } location = /api/nsoc/v1/vnfgrantinfo { rewrite ^ /api/vim/v1/vnfgrantinfo break; access_by_lua_file luaext/auth.lua; proxy_pass http://nsoc; } location /api/nsocnotification/v1 { rewrite ^/api/nsocnotification/v1/(.*) /nsocnotification/v1/$1 break; access_by_lua_file luaext/auth.lua; proxy_pass http://nsoc; } location ~ ^/api/(?:roc|rocnotification)/v1 { access_by_lua_file luaext/auth.lua; proxy_pass http://roc; } location /api/uiframe/v1 { rewrite ^/api/uiframe/v1/(.*) /api/umcsm/v1/$1 break; access_by_lua_file luaext/iui_auth.lua; proxy_pass http://umc; } location ~ ^/api/umc(?:pm|fm|drill|sm|monitor)/v1 { access_by_lua_file luaext/auth.lua; proxy_pass http://umc; } location ~ ^/api/ssh/v1 { proxy_pass http://ssh; } location ~ ^/api/yamlparser/v1 { proxy_pass http://yamlparser; } location ~ ^/api/(?:dac|dacnotification)/v1 { access_by_lua_file luaext/auth.lua; proxy_pass http://dac; } location /api/cmccia/v1 { access_by_lua_file luaext/auth.lua; proxy_pass http://cmcc; } location /api/tackeria/v1 { access_by_lua_file luaext/auth.lua; proxy_pass http://tacker; } location /winery { access_by_lua_file luaext/auth.lua; proxy_pass http://winery; } location = /api/microservices/v1/apiRoute { access_by_lua_file luaext/auth.lua; content_by_lua_file luaext/serviceaccess.lua; } location /api/umcswagger/v1 { rewrite ^/api/umcswagger/v1/(.*) /api/$1 break; access_by_lua_file luaext/auth.lua; proxy_pass http://umc; } location /api/etsiia/v1 { access_by_lua_file luaext/auth.lua; proxy_pass http://etsi; } location /api/odlsdnia/v1 { access_by_lua_file luaext/auth.lua; proxy_pass http://odlsdn; } } }