Pagoda Anti-generation Tutorial

Recently, some netizens asked Pagoda how to set up a reverse proxy. The editor here introduces a simple operation method, which is to use the reverse proxy function that comes with Pagoda's official software panel. First of all, you need to install the pagoda panel. After the Nginx or LNMP environment configuration is complete, you can start to set up the reverse proxy. Let's see the operation steps below.
This method is the simplest and quickest, has no complicated steps, and is not prone to errors. It is the simplest method with zero code and zero deployment.

Implementation preparation

  1. a server
  2. Install Pagoda Panel
  3. OpenAI official API_KEY
  4. ChatGPT website system source code

ChatGPT website system source code , you can take a look at another article introduction:
"The latest ChatGPT website source code + support for ai painting + Prompt role + real-time voice recognition input"

Pagoda recommends installing the official version, open source and free
Linux installation command:

yum install -y wget && wget -O install.sh https://download.bt.cn/install/install_6.0.sh && sh install.sh ed8484bec

start

1. Step 1:
Use the pagoda panel to create a new site - bind your own domain name - select pure static - confirm and submit!
insert image description here

2. The second step:
Deploy the SSL certificate of the domain name.
I won’t introduce too much here.
insert image description here

3. The third step:
add configuration reverse proxy
insert image description here

The target address is filled with Openai’s official API address: https://api.openai.com, and the sending domain name is also: api.openai.com, which is usually obtained automatically.

4. The fourth step:
check verification
insert image description here
insert image description here

You can see that my reverse proxy is already the same as the official one.

use:

Go to the website system or use a local deployment project for use!
insert image description here

In this way, we have implemented the ChatGPT website system to realize the domestic server access to the openai official website interface.

Other possible problems and solutions:

If there is a 502 Bad Gateway problem after the anti-generation ChatGPT API interface :

insert image description here

The main reason is the reason for the SSL certificate. When SSL is turned on, it does not match during the three-way handshake, causing the handshake to fail!

Solution:

Open the site - reverse proxy - configuration file - add two lines of code - save

insert image description here

Code added:
1:

proxy_ssl_server_name on;

2:

proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

Perfect solution:
insert image description here

Test results:
insert image description here
The tutorial is over!

Guess you like

Origin blog.csdn.net/weixin_43227851/article/details/130671338