nginx: how to create an alias url route?

前端 未结 1 1266
攒了一身酷
攒了一身酷 2020-12-13 13:36

basically an server instance is running at

somesite.com/production/folder/here?param=here&count=1

I want to point someite.com/de

相关标签:
1条回答
  • 2020-12-13 14:03
    server {
      server_name example.com;
      root /path/to/root;
      location / {
        # bla bla
      }
      location /demo {
        alias /path/to/root/production/folder/here;
      }
    }
    

    If you need to use try_files inside /demo you'll need to replace alias with a root and do a rewrite because of the bug explained here

    0 讨论(0)
提交回复
热议问题