mod proxy – How to use UNIX domain sockets behind Apache / mod_proxy_uwsgi?

On my development system I’m running a Flask WSGI application with uwsgi and nginx. However on the production server I need to use Apache instead of nginx, so I’m trying to do that. In nginx the site is mounted like this:

location /flaskapp { uwsgi_pass unix:/tmp/flaskapp.sock; }

and it works. In Apache I tried this:

 ProxyPass /flaskapp unix:/tmp/flaskapp.sock|uwsgi://flaskapp

which gives me a 503 error with this in the logfile:

(Fri Jan 01 13:19:45.551524 2021) (proxy:error) (pid 14167) (2)No such file or directory: AH02454: uwsgi: attempt to connect to Unix domain socket /tmp/flaskapp.sock (flaskapp) failed
(Fri Jan 01 13:19:45.551802 2021) (:error) (pid 14167) (client ::1:48950) AH10101: failed to make connection to backend: httpd-UDS:0

I enabled both mod_proxy and mod_proxy_uwsgi modules. I don’t understand the “no such file or directory” bit. The socket file is clearly where it’s supposed to be.

Of course I stopped nginx and then re-started Apache to prevent nginx from keeping a hold on that socket.

The documentation of the ProxyPass directive doesn’t explain what the part after the pipe (“|”) character means so I don’t know what to put there and why.