rewrite cycle
Руслан Закиров
ruz at sports.ru
Thu Dec 15 11:30:17 UTC 2016
Hi,
Below is default foswiki config that falls into "rewrite or internal
redirection cycle while processing
"/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/Main/WebHome"".
This is Nginx 1.11.6.
Any ideas?
location = / {
root $foswiki_root;
rewrite .* /Main/WebHome;
}
location ~ ^/([A-Z_].*)$ {
rewrite ^/(.*)$ /bin/view/$1;
}
location ~ ^/bin/([a-z]+) {
fastcgi_param SCRIPT_NAME $1;
gzip off;
#fastcgi_pass unix:/var/run/nginx/foswiki.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(/bin/\w+)(.*);
fastcgi_param SCRIPT_FILENAME
$foswiki_root/$fastcgi_script_name;
fastcgi_param SCRIPT_NAME
$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
Debug log:
2016/12/15 14:24:02 [debug] 15695#0: *6 test location: "/"
2016/12/15 14:24:02 [debug] 15695#0: *6 using configuration "=/"
2016/12/15 14:24:02 [debug] 15695#0: *6 http cl:-1 max:104857600
2016/12/15 14:24:02 [debug] 15695#0: *6 rewrite phase: 2
2016/12/15 14:24:02 [debug] 15695#0: *6 http script regex: ".*"
2016/12/15 14:24:02 [notice] 15695#0: *6 ".*" matches "/", client:
127.0.0.1, server: wiki.sports.ru, request: "GET / HTTP/1.1", host: "
wiki.sports.ru"
2016/12/15 14:24:02 [debug] 15695#0: *6 http script copy: "/Main/WebHome"
2016/12/15 14:24:02 [debug] 15695#0: *6 http script regex end
2016/12/15 14:24:02 [notice] 15695#0: *6 rewritten data: "/Main/WebHome",
args: "", client: 127.0.0.1, server: wiki.sports.ru, request: "GET /
HTTP/1.1", hos
t: "wiki.sports.ru"
2016/12/15 14:24:02 [debug] 15695#0: *6 post rewrite phase: 3
2016/12/15 14:24:02 [debug] 15695#0: *6 uri changes: 11
2016/12/15 14:24:02 [debug] 15695#0: *6 test location: "/"
2016/12/15 14:24:02 [debug] 15695#0: *6 test location: ~ "^/([A-Z_].*)$"
2016/12/15 14:24:02 [debug] 15695#0: *6 using configuration "^/([A-Z_].*)$"
2016/12/15 14:24:02 [debug] 15695#0: *6 http cl:-1 max:104857600
2016/12/15 14:24:02 [debug] 15695#0: *6 rewrite phase: 2
2016/12/15 14:24:02 [debug] 15695#0: *6 http script regex: "^/(.*)$"
2016/12/15 14:24:02 [notice] 15695#0: *6 "^/(.*)$" matches "/Main/WebHome",
client: 127.0.0.1, server: wiki.sports.ru, request: "GET / HTTP/1.1", host:
"wiki
.sports.ru"
2016/12/15 14:24:02 [debug] 15695#0: *6 http script copy: "/bin/view/"
2016/12/15 14:24:02 [debug] 15695#0: *6 http script capture: "Main/WebHome"
2016/12/15 14:24:02 [debug] 15695#0: *6 http script regex end
2016/12/15 14:24:02 [notice] 15695#0: *6 rewritten data:
"/bin/view/Main/WebHome", args: "", client: 127.0.0.1, server:
wiki.sports.ru, request: "GET / HTTP/1.1", host: "wiki.sports.ru"
2016/12/15 14:24:02 [debug] 15695#0: *6 post rewrite phase: 3
2016/12/15 14:24:02 [debug] 15695#0: *6 uri changes: 10
2016/12/15 14:24:02 [debug] 15695#0: *6 test location: "/"
2016/12/15 14:24:02 [debug] 15695#0: *6 test location: ~ "^/([A-Z_].*)$"
2016/12/15 14:24:02 [debug] 15695#0: *6 using configuration "^/([A-Z_].*)$"
2016/12/15 14:24:02 [debug] 15695#0: *6 http cl:-1 max:104857600
2016/12/15 14:24:02 [debug] 15695#0: *6 rewrite phase: 2
2016/12/15 14:24:02 [debug] 15695#0: *6 http script regex: "^/(.*)$"
2016/12/15 14:24:02 [notice] 15695#0: *6 "^/(.*)$" matches
"/bin/view/Main/WebHome", client: 127.0.0.1, server: wiki.sports.ru,
request: "GET / HTTP/1.1", host: "wiki.sports.ru"
2016/12/15 14:24:02 [debug] 15695#0: *6 http script copy: "/bin/view/"
2016/12/15 14:24:02 [debug] 15695#0: *6 http script capture:
"bin/view/Main/WebHome"
2016/12/15 14:24:02 [debug] 15695#0: *6 http script regex end
2016/12/15 14:24:02 [notice] 15695#0: *6 rewritten data:
"/bin/view/bin/view/Main/WebHome", args: "", client: 127.0.0.1, server:
wiki.sports.ru, request: "GET / HTTP/1.1", host: "wiki.sports.ru"
2016/12/15 14:24:02 [debug] 15695#0: *6 post rewrite phase: 3
--
Руслан Закиров
Руководитель отдела разработки веб-сервисов
+7(916) 597-92-69, ruz @ <http://www.sports.ru/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20161215/57f026dc/attachment.html>
More information about the nginx
mailing list