【问题标题】:dynamicaly set nginx location in configuration file在配置文件中动态设置 nginx 位置
【发布时间】:2015-07-26 02:10:37
【问题描述】:

我想要我的 nginx 动态位置 例如

 ~* /profile/{{anything}}  {
     alias C:/bitbucket/profiles/app/modules/profile;
index profile.html;
    }

我怎样才能做到这一点?

【问题讨论】:

  • 你只想忽略anything
  • 没有任何东西可以像 /profile/1234 或 /profile/profileid
  • 还是不清楚。显示一些示例 URL 以及应该为它们提供哪些文件
  • 好的,我来解释一下。假设有两个配置文件 id 915 和 698,我的链接将是 www.exmaple.com/profile/915 或 www.exmaple.com/profile/698 或 www.exmaple.com/profile/{{anyprofileid}}
  • 不要写在cmets中。将其放入帖子中。

标签: nginx


【解决方案1】:

好的,让我解释一下。假设有两个配置文件 id 915 和 698,我的链接将是 www.exmaple.com/profile/915 或 www.exmaple.com/profile/698 或 www.exmaple.com/profile/{{anyprofileid}} -

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-05-20
    • 2017-07-15
    • 1970-01-01
    • 1970-01-01
    • 2017-04-25
    • 2020-02-18
    相关资源
    最近更新 更多