aboutsummaryrefslogtreecommitdiffstats
path: root/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf
diff options
context:
space:
mode:
Diffstat (limited to 'msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf')
-rw-r--r--msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/mime.types94
-rw-r--r--msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/nginx.conf256
2 files changed, 213 insertions, 137 deletions
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/mime.types b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/mime.types
deleted file mode 100644
index 829e8ba..0000000
--- a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/mime.types
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-types {
- text/html html htm shtml;
- text/css css;
- text/xml xml rss;
- image/gif gif;
- image/jpeg jpeg jpg;
- application/x-javascript js;
- application/atom+xml atom;
-
- text/mathml mml;
- text/plain txt;
- text/vnd.sun.j2me.app-descriptor jad;
- text/vnd.wap.wml wml;
- text/x-component htc;
-
- image/png png;
- image/tiff tif tiff;
- image/vnd.wap.wbmp wbmp;
- image/x-icon ico;
- image/x-jng jng;
- image/x-ms-bmp bmp;
- image/svg+xml svg svgz;
-
- application/java-archive jar war ear;
- application/json json;
- application/mac-binhex40 hqx;
- application/msword doc;
- application/pdf pdf;
- application/postscript ps eps ai;
- application/rtf rtf;
- application/vnd.ms-excel xls;
- application/vnd.ms-powerpoint ppt;
- application/vnd.wap.wmlc wmlc;
- application/vnd.google-earth.kml+xml kml;
- application/vnd.google-earth.kmz kmz;
- application/x-7z-compressed 7z;
- application/x-cocoa cco;
- application/x-java-archive-diff jardiff;
- application/x-java-jnlp-file jnlp;
- application/x-makeself run;
- application/x-perl pl pm;
- application/x-pilot prc pdb;
- application/x-rar-compressed rar;
- application/x-redhat-package-manager rpm;
- application/x-sea sea;
- application/x-shockwave-flash swf;
- application/x-stuffit sit;
- application/x-tcl tcl tk;
- application/x-x509-ca-cert der pem crt;
- application/x-xpinstall xpi;
- application/xhtml+xml xhtml;
- application/zip zip;
-
- application/octet-stream bin exe dll;
- application/octet-stream deb;
- application/octet-stream dmg;
- application/octet-stream eot;
- application/octet-stream iso img;
- application/octet-stream msi msp msm;
- application/ogg ogx;
-
- audio/midi mid midi kar;
- audio/mpeg mpga mpega mp2 mp3 m4a;
- audio/ogg oga ogg spx;
- audio/x-realaudio ra;
- audio/webm weba;
-
- video/3gpp 3gpp 3gp;
- video/mp4 mp4;
- video/mpeg mpeg mpg mpe;
- video/ogg ogv;
- video/quicktime mov;
- video/webm webm;
- video/x-flv flv;
- video/x-mng mng;
- video/x-ms-asf asx asf;
- video/x-ms-wmv wmv;
- video/x-msvideo avi;
-} \ No newline at end of file
diff --git a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/nginx.conf b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/nginx.conf
index 5c524fc..9a2db3f 100644
--- a/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/nginx.conf
+++ b/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/nginx.conf
@@ -1,57 +1,227 @@
-#
-# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#user nobody;
-worker_processes auto;
-worker_rlimit_nofile 50000;
-
-error_log logs/error.log warn;
-pid logs/nginx.pid;
+#user xfs xfs;
+worker_processes 1;
+
+error_log logs/error.log warn;
+pid logs/nginx.pid;
events {
- #linux下打开提高性能
- #use epoll;
- worker_connections 2048;
- multi_accept on;
+ worker_connections 1024;
}
http {
- server_tokens off;
- include mime.types;
- default_type text/html;
+ 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;
+ }
- #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- # '$status $body_bytes_sent "$http_referer" '
- # '"$http_user_agent" "$http_x_forwarded_for"';
+ upstream umc {
+ server 127.0.0.1:8205;
+ }
- #access_log logs/access.log main;
- access_log off;
+ upstream ssh {
+ server 127.0.0.1:8209;
+ }
- sendfile on;
- tcp_nopush on;
+ 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;
- gzip on;
+ #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;
- include ../msb-enabled/*.conf;
- include ../sites-enabled/*.conf;
- include ../sites-enabled-mount/*.conf;
-}
+ # 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;
+ }
-stream {
- include ../stream-enabled/*;
+ location /api/odlsdnia/v1 {
+ access_by_lua_file luaext/auth.lua;
+ proxy_pass http://odlsdn;
+ }
+ }
}