nginx won't change root to sub directory nginx won't change root to sub directory nginx nginx

nginx won't change root to sub directory


riffing off of mim's comment, I got it to work this way

# this one is now working as planned :)server {    listen 80;    server_name second.domain.com;    location / {         # added mim's suggestiong here         rewrite /folder/(.*) /$1 break;          # then added the folder after the port          proxy_pass http://localhost:3000/folder;         proxy_http_version 1.1;         proxy_set_header Upgrade $http_upgrade;         proxy_set_header Connection 'upgrade';         proxy_set_header Host $host;         proxy_cache_bypass $http_upgrade;         root /dir;         index index.html;    } }