It's very difficult to set reverse proxy in Apache. Very bad experience. Cannot find any workable example for reference.
If you are using docker (deploying the Joplin server and PostgreSQL) on the Apache server, the following reverse proxy conf MAY be helpful for you.
ProxyPass "/joplin" http://172.17.0.2:22300 # (IP address of container and port number)
ProxyPassReverse "/joplin" http://172.17.0.2:22300 # (IP address of container and port number)
.env file looks like this:
APP_BASE_URL=https://xxxx.com/joplin (PORT number is NOT necessary)
POSTGRES_HOST=172.17.0.3 (IP address of the container)
For reverse proxying with apache, one can follow this guide (even though it is for Raspberry Pis)
Thank you, buddy.