Reverse Proxy setup on Pi3

First of all thank you for your support.

I’ve modified caddyfile with your suggestion. Here it is:

domain.com
{
root /var/www/html
}

domain.com/plex
{
proxy /plex xxx.xxx.x.xxx:32400/web/ {
transparent 
websocket
}
tls admin@domain.com
}
domain.com/dsm
{
proxy /dsm xxx.xxx.x.xxx:5001 {
transparent 
websocket
}
tls admin@domain.com
}
domain.com/homeassistant
{
proxy /homeassistant xxx.xxx.x.xxx:5123 {
transparent 
websocket
}
tls admin@domain.com
}

As you may notice I added a domain for root and now I’m able to connect to a default landing page on the Pi3.

No luck for the other setting. I always receive a 404 error. And as you may notice I changed url for plex for the index.html location.

Can you please help me?

Thank you in advance