diff --git a/docs/md/devops/2023-04-18-nginx.md b/docs/md/devops/2023-04-18-nginx.md index fa9235c7..59ce1388 100644 --- a/docs/md/devops/2023-04-18-nginx.md +++ b/docs/md/devops/2023-04-18-nginx.md @@ -293,18 +293,18 @@ docker run \ ![](https://bugstack.cn/images/article/devops/dev-ops-nginx-230418-04.png) -## 五、OpenAI 访问 +## 五、重定向 -### 1. 重定向 +### 1. default.conf 在 default.conf 中添加如下配置后重启 Nginx 即可; ```shell location /d5fe/ { rewrite ^/d5fe/(.*)$ /$1 break; - proxy_pass https://api.openai.com; + proxy_pass https://api.x.com; proxy_ssl_server_name on; - proxy_set_header Host api.openai.com; + proxy_set_header Host api.x.com; proxy_set_header Connection ''; proxy_http_version 1.1; chunked_transfer_encoding off; @@ -351,9 +351,9 @@ server { location /abc/ { auth_request /auth; rewrite ^/abc/(.*)$ /$1 break; - proxy_pass https://api.openai.com; + proxy_pass https://api.x.com; proxy_ssl_server_name on; - proxy_set_header Host api.openai.com; + proxy_set_header Host api.x.com; proxy_set_header Connection ''; proxy_http_version 1.1; chunked_transfer_encoding off;