NginX server more than already build react app under the same domain

Viewed 16

I have a trouble serving under the same domain more than one React already built app( so in fact just a static files) I have a config like below

server {
        listen 80;
        listen [::]:80;


        root /var/www/xxx.xxx.xxx.xx;  <IP

       location /portfolio {
                  try_files /portfolio$uri /portfolio$uri/ =404;
         }
        location /portfolio2 {
                try_files /portfolio2$uri /portfolio2$uri/ =404;
        }
}

under the path > /var/www/xxx.xxx.xxx.xx i have 2 folders portfolio and portfolio2 which have build react code inside of each path
Thx a lot for response
0 Answers
Related