How to change the redirect path using ngnix on docker

Viewed 24

I need one help on ngnix which has been installed using docker. I am explaining my code below.

location /site {
        # rewrite ^/static(.*) /$1 break;
        # root /static;
        alias /app/static/angular;
        try_files   $uri $uri/ /index.html =404;
    }

    location /node {
        proxy_pass http://127.0.0.1:8081;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
    }

Using the above code when user is typing https:localhost:port/site the index page is loading. But here my requirement is when user will type only https://localhost:port on browser then the URl should be changed to https:localhost:port/site on browser and same index page will be loaded.any help will be more appreciated.

0 Answers
Related