Linux Panel Series: Configuring Reverse Proxy and Publishing Using Non-443 Ports
本文最后更新于 983 天前,其中的信息可能已经有所发展或是发生改变,如有失效可到评论区留言。
Article Abstract
For scenarios where the 443 port cannot be used due to home networks or non-ICP-filed cloud hosts, HTTPS service publishing is achieved by configuring a reverse proxy and SSL certificate through the aaPanel. The solution includes specifying a non-443 port when adding a site, manually or automatically applying for an SSL certificate (supporting free certificates from Alibaba Cloud/Tencent Cloud and Let's Encrypt auto-renewal), and modifying the site configuration file port for cases without a legitimate 443 port. In practical applications, attention should be paid to the domain name transmission rules of special applications (such as MinIO), and page elements can be modified through content replacement. This practice belongs to the Home Data Center series, providing a feasible reverse proxy configuration scheme for the unified publishing of multiple applications.
Qwen3-14B · 2026-06-18

Preface

Basically, all applications deployed in the home data center are ultimately published externally in a unified manner through a reverse proxy. This has the same significance as configuring a reverse proxy on a cloud host, with the only difference being that the 443 port cannot be used for publishing. Since I am using the aaPanel Linux panel to implement the reverse proxy, this article will take the aaPanel Linux panel as an example to briefly describe how to configure a reverse proxy for a domain namewww.example.comand the steps to enable HTTPS.


It is recommended that everyone use HTTPS; HTTP should no longer be used. On one hand, HTTP is indeed insecure, and on the other hand, many browsers display an insecure warning when accessing HTTP, which looks very annoying~~


Add site

Select "Website" - "Add Site":

image.png

If it is a cloud host with a public IP and the domain name has been ICP-filed, then the 443 port is available, and there is no need to append a port after the domain name in the image above; if it is home broadband or a non-ICP-filed cloud host, you can only use a non-443 port (44443 is just an example, you can fill in any non-443, non-80, and other non-sensitive ports, as long as the port is reachable, but preferably easy to remember~), and finally click ”Submit“ in the bottom right corner.

Set up SSL certificate


Regarding obtaining SSL certificates, there are 2 ways:
Manual application
At various cloud providers, as long as you purchase a domain name, you can get a certain number of free 1-year certificate quotas (usually 20). The following takes Alibaba Cloud and Tencent Cloud as examples to illustrate the application location.
Alibaba Cloud:
The application location is under "Digital Certificate Management Service" - "SSL Certificates" - "Free Certificates" - "Create Certificate":

image.png

Alibaba Cloud has a quota of 20 free certificates per year, and I only have 1 left...
Tencent Cloud:
The application location is under "SSL Certificates" - "My Certificates" - "Free Certificates" - "Apply for Free Certificate":
image.png

It says 50, but Tencent domains can only use 20, which is the same as Alibaba Cloud.

After the certificate is issued, if you want to download it, download the Nginx version:

image.png

Automatic application
This mainly refers to Let's Encrypt, which allows you to apply for a free certificate valid for 3 months and can be automatically renewed. However, a main domain name can only be applied for 5 times within 168 hours; once reached, you can only wait for 168 hours.


The interface for successful site creation is as follows:

image.png

Click ”Settings“ in the red box on the right in the image above to enter the site settings interface:
image.png

Click SSL in the red box on the left in the image above, and the interface is as follows:
image.png

If you are manually adding an SSL certificate, at the current certificate position in the "red box" in the image above, unzip the downloaded Nginx certificate and open thewww.example.com.keyfile, copy all its content into the private key (KEY) in the red box on the bottom left of the image above; open thewww.example.com.pemfile (actually, the contents of .pem and .crt files are the same), copy all its content into the certificate (PEM) in the red box on the bottom right of the image above, and then click the green button below "Save and Enable Certificate".

If you want to useLet's Encryptto automatically apply for an SSL certificate, click the Let's Encrypt tab, as shown below:

image.png

It is recommended to use DNS verification as the verification method, because if the API of the DNS service provider is correctly configured, such as Alibaba Cloud DNS and Tencent Cloud DnsPod APIs, Let's Encrypt can automatically renew before the certificate expires, theoretically meaning you never have to worry about SSL certificate expiration. Finally, click the green "Apply" button below, and normally, after a short wait, the SSL certificate will be automatically applied for and obtained:
image.png

Modify site configuration file (optional)

The reason why this is optional is whether there is a legitimate, ICP-filed 443 port as mentioned earlier. If there is, then this step is not needed; if not, this step is mandatory.

After setting up the SSL certificate in the previous section, the content of the configuration file is as shown below:

image.png

As shown in the red box on the right in the image above, by default, aaPanel places the SSL listening on port 443. If there is a legitimate 443 port, this is of course fine, but if not, this will directly prevent external browsers from establishing an SSL connection. Therefore, you need to change 443 to the port you configured, which is port 44443 in this article, so the modified content is as follows:
image.png

You only need to change this one place, and then click the green "Save" button below.

Set up reverse proxy

Finally, we enter the main topic of this article: setting up the reverse proxy... Everything before was just preparation~.

image.png

Click "Reverse Proxy" in the red box on the left in the image above, and the following interface will appear:
image.png

Click "Add Reverse Proxy" in the red box in the image above, and the following interface will appear:
image.png

If the IP of the intranet application is 192.168.1.100 and the port is 8000, the correct configuration is as follows:
image.png

"There is not much to say about "Target URL", but here I will mention the sent domain name and content replacement.

The default value of the sent domain name, $host, generally does not need to be changed. This means passing the domain name accessed by your browser, which in this article iswww.example.compassed to the application corresponding to the target URL. Many applications do not care about this. However, there are some special applications, such as building COS with MinIO (see article:Docker Series: Building a Private COS Platform Based on MinIO), where its deployed Docker only recognizes host 127.0.0.1 (very speechless), so for MinIO, the sent domain name cannot use the default value. Below is my configuration:

image.png

There are also some other applications, such as WordPress and Nextcloud, which require the access domain name to be hardcoded directly inside the application. These may require modifying the sent domain name.

Content replacement, which is quite useful in some special occasions. For example, the free version pages of some software have many words like "pro", and you can directly use content replacement to replace "pro" with blank space or other words. If you are interested, you can try this.

Note: This article mainly describes the specific operating steps of using the aaPanel Linux panel to build a reverse proxy, without involving too much elaboration on reverse proxy theory. If you want to further understand the role and working method of reverse proxies, you can refer to my other two articles:Home Data Center Series: Application Publishing - Reverse Proxy Edition (Part 1)和Home Data Center Series: Application Publishing - Reverse Proxy Edition (Part 2)。

View Related Categories · 3 Matches
📌 Content Structure Prompt:
This content is part of the following knowledge map, where you can view the complete content path: Blog Knowledge Map。
📎 Related Articles
Share this article
The blog content is original, please indicate the source when reposting! The RSS address of the blog is:https://blog.tangwudi.com/feed, welcome to subscribe; if needed, you can join theTelegram Groupto discuss questions together.
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗ
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Kaomoji
Emoji
Little Dinosaur
Flower!
Previous
Next
       

👋 Welcome to “Wudi's Personal Blog”

Here, long-term exploration is mainly carried out around the following directions:

🧱 Personal Digital Infrastructure and Blog System Construction
☁️ Cloudflare and Network Architecture Practice
🧠 AI and Knowledge System Exploration
🛡️ Network Security and Access Optimization
🎵 Music and Sound Cognition
👁️ Cognitive Perspectives and Worldviews