Sorry if this post is dated back in 2021.
But I will share my knowledge with reverse proxy services.
Here are some examples I can give to help you and everyone else understand how reverse proxy's work.
Domain https://shortsloader.com
--Proxy--
Target URL - https://ip-of-the-other-server
Example - https://192.168.25.42
Example 2 - https://64.192.127.22
if its a vps with a static public ip address.
Make sure website scrips and all content is stored on the server that you plan to point the reverse proxy to.
The ip address of another server (target url).
(THIS IS IMPORTANT)
Make sure domain is included on that webserver which you plan to point the reverse proxy to (target url)
(THIS IS ALSO IMPORTANT).
If planning to use Reverse Proxy as localhost webserver, don't bother with it because reverse proxy is designed to scale webservers out, from reverse proxy server to different webserver that has different configurations, more power, more storage, etc.
You must install the same ssl certificate on all servers associated in order to pass through the requests between reverse proxy and responding webserver. You must also install same ssl certificate on reverse proxy when adding domain to aapanel.
---Sent Domain---
shortsloader.com
The reason is because the reverse proxy needs to send the following headers to another webserver requesting that domain plus finishing the url path for other webpages for that domain.
If a user were to navigate to,
https://shortsloader.com/url/short/navigate.html
the reverse proxy will take that request, then pass through with shortsloader.com domain along with the url path including the requests for an ssl certificate.
(Example: https:192.168.25.42/url/short/navigate.html
)
The responding webserver will then respond to reverse proxy and send back information such as.
https://shortsloader.com/url/short/navigate.html
All servers involved in the following chain are required to have the same ssl certificate otherwise the request will be dropped or browser may throw a warning message due to a missing or incorrect ssl certificate from one of the servers responsible for handling the requests of that domain.
Hope this helps.