Skip to content

Commit

Permalink
Update nginx.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhengwei authored Nov 13, 2024
1 parent 757d4ce commit 17e9909
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/md/road-map/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,18 +294,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;
Expand Down Expand Up @@ -352,9 +352,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;
Expand Down

0 comments on commit 17e9909

Please sign in to comment.