Re: rewrite+ proxy bind -

Sergey Shepelev temotor gmail.com
15 10:43:10 MSK 2009


2009/12/15 Kirill <nginx-forum at nginx.us>:
>  .        .
>   rewrite   proxy_bind    
>     pc->local   ( - )
>     proxy_bind  
> ---------------------------------
> user www-data;
> events {
>  use epoll;
> }
>
> http {
>  include    /etc/nginx/mime.types;
>  default_type application/octet-stream;
>
>  access_log /dev/null;
>
>  resolver 8.8.8.8;
>
>  server {
>  listen  127.0.0.44;
>  location / {
>    set $dir "/";
>    if ( $uri ~* ^/(.+)$ ) {
>    set $dir $1;
>    }
>    access_log /var/log/nginx/127.0.0.44_access_log;
>    proxy_bind "127.0.0.44";
>    proxy_pass  "http://n1ck.name/2.php?$dir";
>  }
>  }
> }
> -------
>     
>    if ( $uri ~* ^/(.+)$ ) {
>    set $dir $1;
>    }
>  nginx   proxy_pass  bind  44 
>
>    .
> !
>

,      (if).

 :
--- f1	2009-12-15 10:36:11.543424434 +0300
+++ f2	2009-12-15 10:41:41.139866364 +0300
@@ -14,13 +14,9 @@
    server {
    listen    127.0.0.44;
    location / {
-       set  "/";
-       if (  ~* ^/(.+)$ ) {
-       set  ;
-       }
       access_log  /var/log/nginx/127.0.0.44_access_log;
       proxy_bind "127.0.0.44";
-      proxy_pass   "http://n1ck.name/2.php?";
+      proxy_pass   "http://n1ck.name/2.php?$uri";
    }
    }
 }

> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,30554,30554#msg-30554
>
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru at nginx.org
> http://nginx.org/mailman/listinfo/nginx-ru
>


nginx-ru