Nginx configures static resources SeaJS-combo for nodeJS

  node.js, question

If you want to use nginx as the reverse proxy, the upstream of the proxy is nodeJS program. What should you do if you want to configure the static resource combo service?

The configuration is as follows:

Case 1
Configuration:

server {
 listen       5555;
 server_name  172.16.42.97;
 
 location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
 bracket
 root /usr/local/nginx/html;
 index   index.html ;
 concat on;
 concat_max_files 20;
 concat_unique on;
 concat_types "application/javascript" "text/css";
 bracket
 location /
 bracket
 proxy_pass http://172.16.42.97:4000/;
 bracket
 bracket

Error 502.

Case 2
Configuration:

server {
 listen       5555;
 server_name  172.16.42.97;
 
 location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
 bracket
 root /usr/local/nginx/html;
 index   index.html ;
 concat on;
 concat_max_files 20;
 concat_unique on;
 concat_types "application/javascript" "text/css";
 bracket
 bracket

Error reported: unexpected token <
Combo synthesis failed

Situation 3
Configuration:

server {
 listen       5555;
 server_name  172.16.42.97;
 
 location /
 bracket
 root /usr/local/nginx/html;
 index   index.html ;
 concat on;
 concat_max_files 20;
 concat_unique on;
 concat_types "application/javascript" "text/css";
 bracket

Normal, no problem.

Direct

location / {
 proxy_pass http://172.16.42.97:4000/;
 bracket

Just throw all non-static resource requests in the past without any expression.