Jianghu Panel - Website Management
12006In this lesson, we will delve deeper into the website management features of the Jianghu Panel.
1. Website Management Features of Jianghu Panel
On the left side of the Jianghu Panel, click to open the "Website" page, where you can see all the websites on the server:

On this page, you can add new sites, as well as perform operations such as disabling, configuring, deleting, and opening individual sites.
Disable Site: In the row of the site you want to disable, click on "Running" under the network status, and a pop-up window will appear. After clicking "OK," the site's status will change to "Disabled."

Open Site: Click the "Open Site" icon next to each site's domain name to open the homepage of the site in a new browser tab. If multiple sites are selected, an "Open Site" button will appear on the right side of the list, which can be clicked to open the homepages of all selected sites. This feature allows you to easily check whether each website is functioning properly.

2. Configuring Website Reverse Proxy with OpenResty
The Jianghu Panel uses the OpenResty plugin as the web server. OpenResty is a web server built on Nginx, primarily used for reverse proxying, load balancing, and HTTP caching.
In this course, the most commonly used feature is reverse proxying. A reverse proxy can forward requests from clients (usually web browsers) to backend servers (which is the JianghuJS project) and return the responses from the backend server to the client, making the client feel as if it is directly communicating with OpenResty.
In Lesson 3, we wrote the following code in the site's "Configuration File":
server {
listen 80;
server_name www.example.com; # Here, change www.example.com to your domain name
# Configure root directory to forward to port 7201
location / {
# Forward requests to the backend API server
proxy_pass http://localhost:7201;
# Some HTTP header handling for reverse proxy
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}In the code above:
- The
location /block defines a reverse proxy, which proxies all requests sent towww.example.comtohttp://127.0.0.1:7201, which is thejianghujs-1table-crudproject. proxy_pass: Specifies the address of the backend server.proxy_set_header: Sets or modifies the HTTP headers passed to the backend server.