{"action":"created","issue":{"url":"https://api.github.com/repos/lj2007331/oneinstack/issues/24","repository_url":"https://api.github.com/repos/lj2007331/oneinstack","labels_url":"https://api.github.com/repos/lj2007331/oneinstack/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/lj2007331/oneinstack/issues/24/comments","events_url":"https://api.github.com/repos/lj2007331/oneinstack/issues/24/events","html_url":"https://github.com/lj2007331/oneinstack/issues/24","id":161361417,"number":24,"title":"lnmpa 组合下的 tengine concat 失效","user":{"login":"cnyyk","id":275233,"avatar_url":"https://avatars.githubusercontent.com/u/275233?v=3","gravatar_id":"","url":"https://api.github.com/users/cnyyk","html_url":"https://github.com/cnyyk","followers_url":"https://api.github.com/users/cnyyk/followers","following_url":"https://api.github.com/users/cnyyk/following{/other_user}","gists_url":"https://api.github.com/users/cnyyk/gists{/gist_id}","starred_url":"https://api.github.com/users/cnyyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cnyyk/subscriptions","organizations_url":"https://api.github.com/users/cnyyk/orgs","repos_url":"https://api.github.com/users/cnyyk/repos","events_url":"https://api.github.com/users/cnyyk/events{/privacy}","received_events_url":"https://api.github.com/users/cnyyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-21T06:50:43Z","updated_at":"2016-08-17T02:27:45Z","closed_at":null,"body":"惯用 lnmpa 组合，tengine 2.1.2 + apache 2.4。\r\n默认安装下，nginx shared 方式编译了 对应的 so 模块，且 nginx.conf 已动态载入了 ngx_http_concat_module.so 模块\r\nnginx -l 能看到\r\n\r\n```\r\nngx_http_concat_module:`\r\n    concat\r\n    concat_max_files\r\n    concat_unique\r\n    concat_types\r\n    concat_delimiter\r\n    concat_ignore_file_error\r\n```\r\n\r\n\r\n在实际使用中，nginx 的 vhost 的 conf，在 location / 目录配置了 concat on。\r\n但访问的时候，abc.com/??static/a.css,static/b.css，会被跳转到 apache 处理。\r\n日志如下：\r\n\r\n```\r\n127.0.0.1 139.196.128.178 - - [21/Jun/2016:14:39:33 +0800] \"GET /??static/a.css,static/b.css HTTP/1.0\" 301 -\r\n127.0.0.1 101.200.101.63 - - [21/Jun/2016:14:39:34 +0800] \"GET /?static/a_css,static/b_css HTTP/1.0\" 200 64043\r\n```\r\n\r\nCURL 的结果如下：\r\n\r\n```\r\ncurl -I http://abc.com/??static/a.css,static/b.css\r\n\r\nHTTP/1.1 301 Moved Permanently\r\nServer: Tengine\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Length: 0\r\nConnection: keep-alive\r\nDate: Tue, 21 Jun 2016 06:44:20 GMT\r\nLocation: http://abc.com/?static/a_css,static/b_css\r\nStrict-Transport-Security: max-age=15768000\r\n```\r\n\r\n经过这样转换后，??变成了一个页面的参数，concat 无法起作用。\r\n\r\n检查后发现可能的问题是 nginx 的 vhost conf 文件里面的如下：\r\n\r\n```\r\nlocation / {\r\n\tconcat on;\r\n\ttry_files $uri @apache;\r\n}\r\n```\r\n\r\n尽管开启了 concat，但是仍然将 ?? 的请求转发到了 apache，从而导致 concat 失效。\r\n\r\n鉴于上述描述，如何在 lnmpa 组合下，将 concat 开启，还请 @lj2007331 指导为谢。"},"comment":{"url":"https://api.github.com/repos/lj2007331/oneinstack/issues/comments/240296895","html_url":"https://github.com/lj2007331/oneinstack/issues/24#issuecomment-240296895","issue_url":"https://api.github.com/repos/lj2007331/oneinstack/issues/24","id":240296895,"user":{"login":"cnyyk","id":275233,"avatar_url":"https://avatars.githubusercontent.com/u/275233?v=3","gravatar_id":"","url":"https://api.github.com/users/cnyyk","html_url":"https://github.com/cnyyk","followers_url":"https://api.github.com/users/cnyyk/followers","following_url":"https://api.github.com/users/cnyyk/following{/other_user}","gists_url":"https://api.github.com/users/cnyyk/gists{/gist_id}","starred_url":"https://api.github.com/users/cnyyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cnyyk/subscriptions","organizations_url":"https://api.github.com/users/cnyyk/orgs","repos_url":"https://api.github.com/users/cnyyk/repos","events_url":"https://api.github.com/users/cnyyk/events{/privacy}","received_events_url":"https://api.github.com/users/cnyyk/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T02:27:45Z","updated_at":"2016-08-17T02:27:45Z","body":"请问这个是 tengine 的问题？还是配置文件不正确导致的？\r\n\r\n还请 @lj2007331 指导为谢"}}
{"actor":{"display_login":"cnyyk"}}