Hi all,<br><br>I'm trying to setup nginx as bellow:<br>      location ~ ^/git(.*)$ {<br>         include /etc/nginx/fastcgi.conf;<br>         fastcgi_param  PATH_INFO        $1;<br>         fastcgi_pass  <a href="http://127.0.0.1:8010">127.0.0.1:8010</a>;<br>
<br>      }<br><br>For information, /etc/nginx/fastcgi.conf:<br><div style="margin-left:40px">fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;               <br>fastcgi_param  QUERY_STRING       $query_string;                                    <br>
fastcgi_param  REQUEST_METHOD     $request_method;                                  <br>fastcgi_param  CONTENT_TYPE       $content_type;                                    <br>fastcgi_param  CONTENT_LENGTH     $content_length;                                  <br>
                                                                                    <br>fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;                             <br>fastcgi_param  REQUEST_URI        $request_uri;                                     <br>
fastcgi_param  DOCUMENT_URI       $document_uri;                                    <br>fastcgi_param  DOCUMENT_ROOT      $document_root;                                   <br>fastcgi_param  SERVER_PROTOCOL    $server_protocol;                                 <br>
                                                                                    <br>fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;                                          <br>fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;                             <br>
                                                                                    <br>fastcgi_param  REMOTE_ADDR        $remote_addr;                                     <br>fastcgi_param  REMOTE_PORT        $remote_port;                                     <br>
fastcgi_param  SERVER_ADDR        $server_addr;                                     <br>fastcgi_param  SERVER_PORT        $server_port;<br>fastcgi_param  SERVER_NAME        $server_name;<br><br></div>It works well, for example, for /git/repo1.git, the PATH_INFO if /repo1.git.<br>
I think using regex is slow, I tryied this :<br>      location /git {<br>         include /etc/nginx/fastcgi.conf;<br>         fastcgi_param  PATH_INFO        $document_uri;<br>         fastcgi_pass  <a href="http://127.0.0.1:8010">127.0.0.1:8010</a>;<br>
      }<br><br>But /git/repo1.git gives me /git/repo1.git instead of I expected /repo1.git.<br>Why? is their a mean to do not use regex or do it faster?<br><br>For your help,<br>In advance,<br>Thanks.<br>