This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/apisix-website.git
The following commit(s) were added to refs/heads/asf-site by this push: new 21896db Deploy to GitHub pages 21896db is described below commit 21896dbd50152b64986d0269009e692bd4257236 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Thu Nov 26 09:04:08 2020 +0000 Deploy to GitHub pages --- apisix/README.html | 1 + apisix/README/index.html | 1 + apisix/customize-nginx-configuration.html | 77 ++++++++++++++++++++++ apisix/customize-nginx-configuration/index.html | 77 ++++++++++++++++++++++ apisix/zh-cn/README.html | 1 + apisix/zh-cn/README/index.html | 1 + apisix/zh-cn/customize-nginx-configuration.html | 77 ++++++++++++++++++++++ .../zh-cn/customize-nginx-configuration/index.html | 77 ++++++++++++++++++++++ sitemap.xml | 2 +- 9 files changed, 313 insertions(+), 1 deletion(-) diff --git a/apisix/README.html b/apisix/README.html index 0ee9b19..46a714c 100644 --- a/apisix/README.html +++ b/apisix/README.html @@ -37,6 +37,7 @@ <li><a href="/apisix/stand-alone">Stand Alone Model</a>: Supports to load route rules from local yaml file, it is more friendly such as under the kubernetes(k8s).</li> <li><a href="/apisix/stream-proxy">Stream Proxy</a></li> <li><a href="/apisix/grpc-proxy">gRPC Proxy</a></li> +<li><a href="/apisix/customize-nginx-configuration">Customize Nginx Configuration</a></li> <li><a href="../CHANGELOG.md">Changelog</a></li> <li><a href="/apisix/benchmark">Benchmark</a></li> <li><a href="../CODE_STYLE.md">Code Style</a></li> diff --git a/apisix/README/index.html b/apisix/README/index.html index 0ee9b19..46a714c 100644 --- a/apisix/README/index.html +++ b/apisix/README/index.html @@ -37,6 +37,7 @@ <li><a href="/apisix/stand-alone">Stand Alone Model</a>: Supports to load route rules from local yaml file, it is more friendly such as under the kubernetes(k8s).</li> <li><a href="/apisix/stream-proxy">Stream Proxy</a></li> <li><a href="/apisix/grpc-proxy">gRPC Proxy</a></li> +<li><a href="/apisix/customize-nginx-configuration">Customize Nginx Configuration</a></li> <li><a href="../CHANGELOG.md">Changelog</a></li> <li><a href="/apisix/benchmark">Benchmark</a></li> <li><a href="../CODE_STYLE.md">Code Style</a></li> diff --git a/apisix/customize-nginx-configuration.html b/apisix/customize-nginx-configuration.html new file mode 100644 index 0000000..0af16ea --- /dev/null +++ b/apisix/customize-nginx-configuration.html @@ -0,0 +1,77 @@ +<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>apisix/customize-nginx-configuration · Apache APISIX™</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<!--"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="apisix/customize-nginx-configuration · Apache APISIX™"/><meta property="og:type" content [...] + document.addEventListener('DOMContentLoaded', function() { + addBackToTop( + {"zIndex":100} + ) + }); + </script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><img class="logo" src="/img/logo.png" alt="Apache APISIX™"/><h2 class="headerTitleWithLogo">Apache APISIX™</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site n [...] +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +--> +<p><a href="/apisix/zh-cn/customize-nginx-configuration">中文</a></p> +<h1><a class="anchor" aria-hidden="true" id="customize-nginx-configuration"></a><a href="#customize-nginx-configuration" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...] +<p>The Nginx configuration used by APISIX is generated via the template file <code>apisix/ngx_tpl.lua</code> and the options from <code>conf/config-default.yaml</code> / <code>conf/config.yaml</code>.</p> +<p>You can take a look at the generated Nginx configuration in <code>conf/nginx.conf</code> after running <code>./bin/apisix start</code>.</p> +<p>If you want to customize the Nginx configuration, please read through the <code>nginx_config</code> in <code>conf/config-default.yaml</code>. You can override the default value in the <code>conf/config.yaml</code>. For instance, you can inject some snippets in the <code>conf/nginx.conf</code> via configuring the <code>xxx_snippet</code> entries:</p> +<pre><code class="hljs css language-yaml"><span class="hljs-string">...</span> +<span class="hljs-comment"># put this in config.yaml:</span> +<span class="hljs-attr">nginx_config:</span> + <span class="hljs-attr">main_configuration_snippet:</span> <span class="hljs-string">| + daemon on; +</span> <span class="hljs-attr">http_configuration_snippet:</span> <span class="hljs-string">| + server + { + listen 45651; + server_name _; + access_log off; +</span> + <span class="hljs-string">location</span> <span class="hljs-string">/ysec_status</span> <span class="hljs-string">{</span> + <span class="hljs-string">req_status_show;</span> + <span class="hljs-string">allow</span> <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span><span class="hljs-string">;</span> + <span class="hljs-string">deny</span> <span class="hljs-string">all;</span> + <span class="hljs-string">}</span> + <span class="hljs-string">}</span> + + <span class="hljs-string">chunked_transfer_encoding</span> <span class="hljs-string">on;</span> + + <span class="hljs-attr">http_server_configuration_snippet:</span> <span class="hljs-string">| + set $my "var"; +</span> <span class="hljs-attr">http_admin_configuration_snippet:</span> <span class="hljs-string">| + log_format admin "$request_time $pipe"; +</span> <span class="hljs-attr">stream_configuration_snippet:</span> <span class="hljs-string">| + tcp_nodelay off; +</span><span class="hljs-string">...</span> +</code></pre> +</span></div></article></div><div class="docs-prevnext"></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"></a><div><h5>ASF</h5><a href="https://www.apache.org/">Foundation</a><a href="https://www.apache.org/licenses/">License</a><a href="http://www.apache.org/events/current-event/">Events</a><a href="https://www.apache.org/security/">Security</a><a href="https://www.apache.org/foundation/spons [...] + document.addEventListener('keyup', function(e) { + if (e.target !== document.body) { + return; + } + // keyCode for '/' (slash) + if (e.keyCode === 191) { + const search = document.getElementById('search_input_react'); + search && search.focus(); + } + }); + </script><script> + var search = docsearch({ + appId: 'ZHVP417Y1Y', + apiKey: '79e72fedcf3719ba85c552f710ade8a3', + indexName: 'apache-apisix-website', + inputSelector: '#search_input_react' + }); + </script></body></html> \ No newline at end of file diff --git a/apisix/customize-nginx-configuration/index.html b/apisix/customize-nginx-configuration/index.html new file mode 100644 index 0000000..0af16ea --- /dev/null +++ b/apisix/customize-nginx-configuration/index.html @@ -0,0 +1,77 @@ +<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>apisix/customize-nginx-configuration · Apache APISIX™</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<!--"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="apisix/customize-nginx-configuration · Apache APISIX™"/><meta property="og:type" content [...] + document.addEventListener('DOMContentLoaded', function() { + addBackToTop( + {"zIndex":100} + ) + }); + </script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><img class="logo" src="/img/logo.png" alt="Apache APISIX™"/><h2 class="headerTitleWithLogo">Apache APISIX™</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site n [...] +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +--> +<p><a href="/apisix/zh-cn/customize-nginx-configuration">中文</a></p> +<h1><a class="anchor" aria-hidden="true" id="customize-nginx-configuration"></a><a href="#customize-nginx-configuration" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 [...] +<p>The Nginx configuration used by APISIX is generated via the template file <code>apisix/ngx_tpl.lua</code> and the options from <code>conf/config-default.yaml</code> / <code>conf/config.yaml</code>.</p> +<p>You can take a look at the generated Nginx configuration in <code>conf/nginx.conf</code> after running <code>./bin/apisix start</code>.</p> +<p>If you want to customize the Nginx configuration, please read through the <code>nginx_config</code> in <code>conf/config-default.yaml</code>. You can override the default value in the <code>conf/config.yaml</code>. For instance, you can inject some snippets in the <code>conf/nginx.conf</code> via configuring the <code>xxx_snippet</code> entries:</p> +<pre><code class="hljs css language-yaml"><span class="hljs-string">...</span> +<span class="hljs-comment"># put this in config.yaml:</span> +<span class="hljs-attr">nginx_config:</span> + <span class="hljs-attr">main_configuration_snippet:</span> <span class="hljs-string">| + daemon on; +</span> <span class="hljs-attr">http_configuration_snippet:</span> <span class="hljs-string">| + server + { + listen 45651; + server_name _; + access_log off; +</span> + <span class="hljs-string">location</span> <span class="hljs-string">/ysec_status</span> <span class="hljs-string">{</span> + <span class="hljs-string">req_status_show;</span> + <span class="hljs-string">allow</span> <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span><span class="hljs-string">;</span> + <span class="hljs-string">deny</span> <span class="hljs-string">all;</span> + <span class="hljs-string">}</span> + <span class="hljs-string">}</span> + + <span class="hljs-string">chunked_transfer_encoding</span> <span class="hljs-string">on;</span> + + <span class="hljs-attr">http_server_configuration_snippet:</span> <span class="hljs-string">| + set $my "var"; +</span> <span class="hljs-attr">http_admin_configuration_snippet:</span> <span class="hljs-string">| + log_format admin "$request_time $pipe"; +</span> <span class="hljs-attr">stream_configuration_snippet:</span> <span class="hljs-string">| + tcp_nodelay off; +</span><span class="hljs-string">...</span> +</code></pre> +</span></div></article></div><div class="docs-prevnext"></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"></a><div><h5>ASF</h5><a href="https://www.apache.org/">Foundation</a><a href="https://www.apache.org/licenses/">License</a><a href="http://www.apache.org/events/current-event/">Events</a><a href="https://www.apache.org/security/">Security</a><a href="https://www.apache.org/foundation/spons [...] + document.addEventListener('keyup', function(e) { + if (e.target !== document.body) { + return; + } + // keyCode for '/' (slash) + if (e.keyCode === 191) { + const search = document.getElementById('search_input_react'); + search && search.focus(); + } + }); + </script><script> + var search = docsearch({ + appId: 'ZHVP417Y1Y', + apiKey: '79e72fedcf3719ba85c552f710ade8a3', + indexName: 'apache-apisix-website', + inputSelector: '#search_input_react' + }); + </script></body></html> \ No newline at end of file diff --git a/apisix/zh-cn/README.html b/apisix/zh-cn/README.html index 1e53a5a..c96cea4 100644 --- a/apisix/zh-cn/README.html +++ b/apisix/zh-cn/README.html @@ -36,6 +36,7 @@ <li><a href="/apisix/zh-cn/stand-alone">独立运行模型</a>: 支持从本地 yaml 格式的配置文件启动,更适合 Kubernetes(k8s) 体系。</li> <li><a href="/apisix/zh-cn/stream-proxy">TCP/UDP 动态代理</a></li> <li><a href="/apisix/zh-cn/grpc-proxy">gRPC 代理</a></li> +<li><a href="/apisix/zh-cn/customize-nginx-configuration">自定义 Nginx 配置</a></li> <li><a href="../../CHANGELOG_CN.md">变更日志</a></li> <li><a href="/apisix/zh-cn/benchmark">压力测试</a></li> <li><a href="../../CODE_STYLE_CN.md">代码风格</a></li> diff --git a/apisix/zh-cn/README/index.html b/apisix/zh-cn/README/index.html index 1e53a5a..c96cea4 100644 --- a/apisix/zh-cn/README/index.html +++ b/apisix/zh-cn/README/index.html @@ -36,6 +36,7 @@ <li><a href="/apisix/zh-cn/stand-alone">独立运行模型</a>: 支持从本地 yaml 格式的配置文件启动,更适合 Kubernetes(k8s) 体系。</li> <li><a href="/apisix/zh-cn/stream-proxy">TCP/UDP 动态代理</a></li> <li><a href="/apisix/zh-cn/grpc-proxy">gRPC 代理</a></li> +<li><a href="/apisix/zh-cn/customize-nginx-configuration">自定义 Nginx 配置</a></li> <li><a href="../../CHANGELOG_CN.md">变更日志</a></li> <li><a href="/apisix/zh-cn/benchmark">压力测试</a></li> <li><a href="../../CODE_STYLE_CN.md">代码风格</a></li> diff --git a/apisix/zh-cn/customize-nginx-configuration.html b/apisix/zh-cn/customize-nginx-configuration.html new file mode 100644 index 0000000..6923517 --- /dev/null +++ b/apisix/zh-cn/customize-nginx-configuration.html @@ -0,0 +1,77 @@ +<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>apisix/zh-cn/customize-nginx-configuration · Apache APISIX™</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<!--"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="apisix/zh-cn/customize-nginx-configuration · Apache APISIX™"/><meta property="og:t [...] + document.addEventListener('DOMContentLoaded', function() { + addBackToTop( + {"zIndex":100} + ) + }); + </script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><img class="logo" src="/img/logo.png" alt="Apache APISIX™"/><h2 class="headerTitleWithLogo">Apache APISIX™</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site n [...] +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +--> +<p><a href="/apisix/customize-nginx-configuration">English</a></p> +<h1><a class="anchor" aria-hidden="true" id="自定义-nginx-配置"></a><a href="#自定义-nginx-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83. [...] +<p>APISIX 会通过 <code>apisix/ngx_tpl.lua</code> 这个模板和 <code>conf/config-default.yaml</code> 加 <code>conf/config.yaml</code> 的配置生成 Nginx 配置文件。</p> +<p>在执行完 <code>./bin/apisix start</code>,你可以在 <code>conf/nginx.conf</code> 看到生成的 Nginx 配置文件。</p> +<p>在自定义 Nginx 配置文件之前,烦请仔细阅读 <code>conf/config-default.yaml</code>。你可以在 <code>conf/config.yaml</code> 里面覆盖掉默认值。举个例子,你可以通过 <code>xxx_snippet</code> 之类的配置,在 <code>conf/nginx.conf</code> 里面注入你的自定义配置:</p> +<pre><code class="hljs css language-yaml"><span class="hljs-string">...</span> +<span class="hljs-comment"># config.yaml 里面的内容</span> +<span class="hljs-attr">nginx_config:</span> + <span class="hljs-attr">main_configuration_snippet:</span> <span class="hljs-string">| + daemon on; +</span> <span class="hljs-attr">http_configuration_snippet:</span> <span class="hljs-string">| + server + { + listen 45651; + server_name _; + access_log off; +</span> + <span class="hljs-string">location</span> <span class="hljs-string">/ysec_status</span> <span class="hljs-string">{</span> + <span class="hljs-string">req_status_show;</span> + <span class="hljs-string">allow</span> <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span><span class="hljs-string">;</span> + <span class="hljs-string">deny</span> <span class="hljs-string">all;</span> + <span class="hljs-string">}</span> + <span class="hljs-string">}</span> + + <span class="hljs-string">chunked_transfer_encoding</span> <span class="hljs-string">on;</span> + + <span class="hljs-attr">http_server_configuration_snippet:</span> <span class="hljs-string">| + set $my "var"; +</span> <span class="hljs-attr">http_admin_configuration_snippet:</span> <span class="hljs-string">| + log_format admin "$request_time $pipe"; +</span> <span class="hljs-attr">stream_configuration_snippet:</span> <span class="hljs-string">| + tcp_nodelay off; +</span><span class="hljs-string">...</span> +</code></pre> +</span></div></article></div><div class="docs-prevnext"></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"></a><div><h5>ASF</h5><a href="https://www.apache.org/">Foundation</a><a href="https://www.apache.org/licenses/">License</a><a href="http://www.apache.org/events/current-event/">Events</a><a href="https://www.apache.org/security/">Security</a><a href="https://www.apache.org/foundation/spons [...] + document.addEventListener('keyup', function(e) { + if (e.target !== document.body) { + return; + } + // keyCode for '/' (slash) + if (e.keyCode === 191) { + const search = document.getElementById('search_input_react'); + search && search.focus(); + } + }); + </script><script> + var search = docsearch({ + appId: 'ZHVP417Y1Y', + apiKey: '79e72fedcf3719ba85c552f710ade8a3', + indexName: 'apache-apisix-website', + inputSelector: '#search_input_react' + }); + </script></body></html> \ No newline at end of file diff --git a/apisix/zh-cn/customize-nginx-configuration/index.html b/apisix/zh-cn/customize-nginx-configuration/index.html new file mode 100644 index 0000000..6923517 --- /dev/null +++ b/apisix/zh-cn/customize-nginx-configuration/index.html @@ -0,0 +1,77 @@ +<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>apisix/zh-cn/customize-nginx-configuration · Apache APISIX™</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="<!--"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="apisix/zh-cn/customize-nginx-configuration · Apache APISIX™"/><meta property="og:t [...] + document.addEventListener('DOMContentLoaded', function() { + addBackToTop( + {"zIndex":100} + ) + }); + </script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><img class="logo" src="/img/logo.png" alt="Apache APISIX™"/><h2 class="headerTitleWithLogo">Apache APISIX™</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site n [...] +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# +--> +<p><a href="/apisix/customize-nginx-configuration">English</a></p> +<h1><a class="anchor" aria-hidden="true" id="自定义-nginx-配置"></a><a href="#自定义-nginx-配置" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83. [...] +<p>APISIX 会通过 <code>apisix/ngx_tpl.lua</code> 这个模板和 <code>conf/config-default.yaml</code> 加 <code>conf/config.yaml</code> 的配置生成 Nginx 配置文件。</p> +<p>在执行完 <code>./bin/apisix start</code>,你可以在 <code>conf/nginx.conf</code> 看到生成的 Nginx 配置文件。</p> +<p>在自定义 Nginx 配置文件之前,烦请仔细阅读 <code>conf/config-default.yaml</code>。你可以在 <code>conf/config.yaml</code> 里面覆盖掉默认值。举个例子,你可以通过 <code>xxx_snippet</code> 之类的配置,在 <code>conf/nginx.conf</code> 里面注入你的自定义配置:</p> +<pre><code class="hljs css language-yaml"><span class="hljs-string">...</span> +<span class="hljs-comment"># config.yaml 里面的内容</span> +<span class="hljs-attr">nginx_config:</span> + <span class="hljs-attr">main_configuration_snippet:</span> <span class="hljs-string">| + daemon on; +</span> <span class="hljs-attr">http_configuration_snippet:</span> <span class="hljs-string">| + server + { + listen 45651; + server_name _; + access_log off; +</span> + <span class="hljs-string">location</span> <span class="hljs-string">/ysec_status</span> <span class="hljs-string">{</span> + <span class="hljs-string">req_status_show;</span> + <span class="hljs-string">allow</span> <span class="hljs-number">127.0</span><span class="hljs-number">.0</span><span class="hljs-number">.1</span><span class="hljs-string">;</span> + <span class="hljs-string">deny</span> <span class="hljs-string">all;</span> + <span class="hljs-string">}</span> + <span class="hljs-string">}</span> + + <span class="hljs-string">chunked_transfer_encoding</span> <span class="hljs-string">on;</span> + + <span class="hljs-attr">http_server_configuration_snippet:</span> <span class="hljs-string">| + set $my "var"; +</span> <span class="hljs-attr">http_admin_configuration_snippet:</span> <span class="hljs-string">| + log_format admin "$request_time $pipe"; +</span> <span class="hljs-attr">stream_configuration_snippet:</span> <span class="hljs-string">| + tcp_nodelay off; +</span><span class="hljs-string">...</span> +</code></pre> +</span></div></article></div><div class="docs-prevnext"></div></div></div><nav class="onPageNav"></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"></a><div><h5>ASF</h5><a href="https://www.apache.org/">Foundation</a><a href="https://www.apache.org/licenses/">License</a><a href="http://www.apache.org/events/current-event/">Events</a><a href="https://www.apache.org/security/">Security</a><a href="https://www.apache.org/foundation/spons [...] + document.addEventListener('keyup', function(e) { + if (e.target !== document.body) { + return; + } + // keyCode for '/' (slash) + if (e.keyCode === 191) { + const search = document.getElementById('search_input_react'); + search && search.focus(); + } + }); + </script><script> + var search = docsearch({ + appId: 'ZHVP417Y1Y', + apiKey: '79e72fedcf3719ba85c552f710ade8a3', + indexName: 'apache-apisix-website', + inputSelector: '#search_input_react' + }); + </script></body></html> \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 2820ab2..67c6495 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://apisix.apache.org/help</loc><changefreq>weekly</changefreq><priority>0.5</priority><x [...] \ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://apisix.apache.org/help</loc><changefreq>weekly</changefreq><priority>0.5</priority><x [...] \ No newline at end of file