Use URL subdirectory instead of port

Thx @RbDev but I think I need to pass through a reverse proxy, anyway.
I’m serving different services on the same apache host (port 80) and I’d like to add mattermost on a subdirectory like that:
http://example.com/foo
http://example.com/bar
http://example.com/mattermost
I’m contrained to use port 80 also for mattermost, so I need a port mapping/reverse proxying of some sort.
Or am I missing something?