【发布时间】:2012-02-28 09:58:51
【问题描述】:
我安装了 nginx 1.0.8。 这是我的问题: 我有 2 个文件:file1.js 和 file2.js。请求的路径是这样的:
www.mysite.com/files_dir/%user%/file.js
如果请求的标头:“X-Header”存在且值为“OK”,则响应的内容应为 file1.js,否则为 file2.js。
文件位于“html/files_dir”中,%user% 是一组目录,代表通过我的服务注册的用户名。
如何在 nginx 中进行配置?我对 php、asp 或类似技术不感兴趣,只有在 nginx 有可能的情况下。
谢谢
【问题讨论】:
标签: nginx server-configuration