-1

Its my nginx configuration file

server {
    listen 80;
    server_name san.cashbaba.com.bd www.san.cashbaba.com.bd;
    location / {
        proxy_pass http://localhost:3000;
                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;
    }

}

its now working perfectly . my requirement is if anyone write in browser address bar san.cashbaba.com.bd/admin then another application open which already store in /usr/share/nginx/html/adminApp folder .

anyone help me how to write this configuration in this config file

tapos ghosh
  • 2,114
  • 23
  • 37

1 Answers1

0

You can specify another location block like that, nginx will apply the most concrete match on each request.

location /admin {
    root /usr/share/nginx/html/adminApp
    index index.html index.htm;
}

The official doc here and a good document form Linode here

wolmi
  • 1,659
  • 12
  • 25