Apache: redirect specific URL to a local server on different port

Solution 1:

Don't use mod_rewrite unless you have a reason to do so.

Try this (put it in the <VirtualHost> block):

ProxyPass /atom http://127.0.0.1:4000/atom
ProxyPassReverse /atom http://127.0.0.1:4000/atom