Running haproxy behind nginx to reverse proxy node app

I’m running a mailinabox server that is using nginx as a web server. That app controls the nginx config, and so I’m trying to use haproxy to expose my node app to a particular subdirectory of this domain.

HA-Proxy version 1.8.8-1ubuntu0.11

frontend http
   acl staticman path_end -i /staticman

   use_backend server1 if staticman

backend server1
   server server localhost:1111

I’ve got node running on port 1111, and am hoping requests to mydomain.com/staticman/different/dir/depending/on/request will output from the node app running at localhost:1111

I’ve seen examples of something similar doing a bit of regex to recreate the path after /staticman/.
Also, I’m not sure if I need to give haproxy my certificate for https, or if it will just middleman between node and nginx.

This is quite new to me, and HAProxy does a lot of things, so hopefully someone here can make sense of this post and offer some suggestions. This is a difficult question to search for.

Thanks