Apache static file proxy path configuration problem

want to configure the agent for the front-end static file. Redirect the static files of the node server to Apache. The configuration is as follows:

RewriteCond %{REQUEST_URI} ^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg)$
RewriteCond /home/work/plat/project/public%{REQUEST_URI} !-f
RewriteRule ^(.*)$ /home/work/new/data/public/$1 [L]

apache/home/work/plat/project/public/static,http://www.xxx.com/static/a.js
node/home/work/new/data/public/static/
http://www.xxx.com/public/static/a.js

but it never works. To solve why, is my path configuration wrong?

Mar.11,2021

has been modified, but the problem is that $1djim1 is getting the access path to the file. The actual access static file directory for
node can be configured as / home/work/new/data/.

Menu