diff options
Diffstat (limited to 'openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext')
4 files changed, 59 insertions, 0 deletions
diff --git a/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/README.md b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/README.md new file mode 100644 index 0000000..58310a7 --- /dev/null +++ b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/README.md @@ -0,0 +1,11 @@ +README +=============== + +The directory to store configuration files that extends locations of the default listening server(e.g 10080). +The config file must be a *.conf file. For example: +#testlocation.conf +~~~ +location = /test { + echo "test ok"; +} +~~~
\ No newline at end of file diff --git a/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/cert.conf b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/cert.conf new file mode 100644 index 0000000..3d84943 --- /dev/null +++ b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/cert.conf @@ -0,0 +1,19 @@ +# +# 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. +# + +location /cert { + root html ; +}
\ No newline at end of file diff --git a/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/defaultpage.conf b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/defaultpage.conf new file mode 100644 index 0000000..edd9ed9 --- /dev/null +++ b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/defaultpage.conf @@ -0,0 +1,9 @@ +location @defaultpage { + content_by_lua_block{ + local error_page_head = '<html><head><title>502 Bad Gateway</title></head><body bgcolor="white"><center><h1>502 Bad Gateway</h1></center><center>error message:' + local error_page_foot = '</center><hr><center>nginx</center></body></html>' + ngx.status = ngx.HTTP_BAD_GATEWAY + ngx.print(error_page_head.."default homepage undefined"..error_page_foot) + return ngx.exit(ngx.status) + } +}
\ No newline at end of file diff --git a/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/homepage.conf b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/homepage.conf new file mode 100644 index 0000000..543691a --- /dev/null +++ b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/location-ext/homepage.conf @@ -0,0 +1,20 @@ +# +# 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. +# + +location = /msb { + #rewrite ^ /iui/microservices/default.html redirect; + return 302 $scheme://$http_host/iui/microservices/default.html; +}
\ No newline at end of file |