tokers commented on a change in pull request #4663:
URL: https://github.com/apache/apisix/pull/4663#discussion_r676231362
##########
File path: docs/en/latest/FAQ.md
##########
@@ -552,3 +552,406 @@ apisix:
**Note:**
- Whenever trying to connect TLS services with cosocket, you should set
`apisix.ssl.ssl_trusted_certificate`
+
+An example, if using Nacos as a service discovery in APISIX, Nacos has TLS
protocol enabled, i.e. Nacos configuration `host` starts with `https://`, so
you need to configure `apisix.ssl.ssl_trusted_certificate` and use the same CA
certificate as Nacos.
+
+## Proxy static files with APISIX, how to configure routes
+
+Proxy static files with Nginx, for example:
+
+```nginx
+location ~* .(js|css|flash|media|jpg|png|gif|ico|vbs|json|txt)$ {
+...
+}
+```
+
+In `nginx.conf`, this means matching requests with js, css, etc. as a suffix.
This configuration can be converted into a route with regular matching for
APISIX, for example:
+
+```json
+{
+ "uri": "/*",
+ "vars": [
+ ["uri", "~~", ".(js|css|flash|media|jpg|png|gif|ico|vbs|json|txt)$"]
+ ]
+}
+```
+
+## How to fix `module 'resty.worker.events' not found` error
+
+Installing APISIX under the `/root` directory causes this problem. Because the
worker process is run by nobody, it does not have access to the files in the
`/root` directory. You need to move the APISIX installation directory, and it
is recommended to install it in the `/usr/local` directory.
Review comment:
```suggestion
Installing APISIX under the `/root` directory causes this problem. Because
the worker process is run by the user `nobody`, it does not have enough
permissions to access the files in the `/root` directory. You need to change
the APISIX installation directory, and it is recommended to install it in the
`/usr/local` directory.
```
##########
File path: docs/en/latest/FAQ.md
##########
@@ -552,3 +552,406 @@ apisix:
**Note:**
- Whenever trying to connect TLS services with cosocket, you should set
`apisix.ssl.ssl_trusted_certificate`
+
+An example, if using Nacos as a service discovery in APISIX, Nacos has TLS
protocol enabled, i.e. Nacos configuration `host` starts with `https://`, so
you need to configure `apisix.ssl.ssl_trusted_certificate` and use the same CA
certificate as Nacos.
+
+## Proxy static files with APISIX, how to configure routes
+
+Proxy static files with Nginx, for example:
+
+```nginx
+location ~* .(js|css|flash|media|jpg|png|gif|ico|vbs|json|txt)$ {
+...
+}
+```
+
+In `nginx.conf`, this means matching requests with js, css, etc. as a suffix.
This configuration can be converted into a route with regular matching for
APISIX, for example:
+
+```json
+{
+ "uri": "/*",
+ "vars": [
+ ["uri", "~~", ".(js|css|flash|media|jpg|png|gif|ico|vbs|json|txt)$"]
+ ]
+}
+```
+
+## How to fix `module 'resty.worker.events' not found` error
+
+Installing APISIX under the `/root` directory causes this problem. Because the
worker process is run by nobody, it does not have access to the files in the
`/root` directory. You need to move the APISIX installation directory, and it
is recommended to install it in the `/usr/local` directory.
+
+## How to get the real Client IP in APISIX
+
+This feature relies on the [Real
IP](http://nginx.org/en/docs/http/ngx_http_realip_module.html) module of Nginx,
which is covered in the
[APISIX-OpenResty](https://raw.githubusercontent.com/api7/apisix-build-tools/master/build-apisix-openresty.sh)
script.
+
+There are 3 directives in the Real IP module
+
+- set_real_ip_from
+- real_ip_header
+- real_ip_recursive
+
+The following describes how to use these three directives in the specific
scenario.
+
+1. Client -> APISIX -> Upstream
+
+When the Client connects directly to APISIX, no special configuration is
needed, APISIX can automatically get the real Client IP.
+
+2. Client -> Nginx -> APISIX -> Upstream
Review comment:
You should tell the readers that `Nginx` here is just an example, other
intermediate proxies are similar, like AWS cloudfront.
##########
File path: docs/en/latest/FAQ.md
##########
@@ -552,3 +552,406 @@ apisix:
**Note:**
- Whenever trying to connect TLS services with cosocket, you should set
`apisix.ssl.ssl_trusted_certificate`
+
+An example, if using Nacos as a service discovery in APISIX, Nacos has TLS
protocol enabled, i.e. Nacos configuration `host` starts with `https://`, so
you need to configure `apisix.ssl.ssl_trusted_certificate` and use the same CA
certificate as Nacos.
Review comment:
```suggestion
As an example, if using Nacos as a service discovery in APISIX, and Nacos
has TLS protocol enabled, i.e. Nacos configuration `host` starts with
`https://`, so you need to configure `apisix.ssl.ssl_trusted_certificate` and
use the same CA certificate as Nacos.
```
##########
File path: docs/en/latest/FAQ.md
##########
@@ -552,3 +552,406 @@ apisix:
**Note:**
- Whenever trying to connect TLS services with cosocket, you should set
`apisix.ssl.ssl_trusted_certificate`
+
+An example, if using Nacos as a service discovery in APISIX, Nacos has TLS
protocol enabled, i.e. Nacos configuration `host` starts with `https://`, so
you need to configure `apisix.ssl.ssl_trusted_certificate` and use the same CA
certificate as Nacos.
Review comment:
Also, add the hyperlink for Nacos.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]