Proxy error handling

Igor Shergin igor at shergin.ru
Thu Feb 28 17:48:10 MSK 2008


-            rewrite ^/test3(.*)$     /3.jpg;
-            rewrite ^/test2(.*)$     /2.jpg;
-            rewrite ^/test1(.*)$     /1.jpg;
-            return 200;

+            rewrite ^/test3(.*)$     /3.jpg  break;
+            rewrite ^/test2(.*)$     /2.jpg  break;
+            rewrite ^                /1.jpg  break;

Теперь выходит так:

igors at core0% telnet proxytest 80
Trying...
Connected to proxytest.
Escape character is '^]'.
GET /q HTTP/1.1
Host: proxytest
User-Agent: Test

Connection closed by foreign host.

Воспроизводится и на хосте с 0.5.33.

-- 
Igor Shergin







More information about the nginx-ru mailing list