monit rewrite

Mark Alan varia at e-healthexpert.org
Thu Sep 27 10:17:49 UTC 2012


On Thu, 27 Sep 2012 11:55:38 +0400, Igor Sysoev <igor at sysoev.ru> wrote:
> On Thu, Sep 27, 2012 at 09:53:25AM +0200, António P. P. Almeida wrote:

> http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
> 
>   If proxy_pass is specified with URI, when passing a request to the
>   server, part of a normalized request URI matching the location is
>   replaced by a URI specified in the directive:
> 
>     location /name/ {
>         proxy_pass http://127.0.0.1/remote/;
>     }

1. Does what is documented about proxy_pass:
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
also applies to fastcgi_pass ?
http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_pass

2. And is it also valid if using an unix socket instead of http://127.0.0.1/?
Would the following be ok?
location ^~ /owncloud4/ {
  location ~ ^(?<script>.+\.php)(?<path_info>.*)$ {
    include fastcgi_params;
    fastcgi_pass unix:/tmp/php-fpm.socket;
    fastcgi_param SCRIPT_FILENAME $document_root$script;
    fastcgi_param SCRIPT_NAME $script;
    fastcgi_param PATH_INFO $path_info;
  }
} 

Thank you,
Mark



More information about the nginx mailing list