CreateFile() error
Igor Sysoev
is at rambler-co.ru
Wed Sep 16 11:43:27 MSD 2009
On Tue, Sep 15, 2009 at 11:23:22PM +0500, Ziyad Saeed wrote:
> The url is http://dev.flow3.local/flow3/welcome
> Here is the error
> CreateFile() "C:\nginx/htmlindex.php/flow3/welcome" failed (3: The system
> cannot find the path specified)
The redirected request is handled again by "location /", because
it is not matched by "location ~ \.php$". The right configuration is
below. I also inlcude fastcgi_split_path_info to get right
$fastcgi_script_name for SCRIPT_FILENAME.
It also strange, that the path is
"C:\nginx/htmlindex.php/flow3/welcome", but not
"C:\nginx/html/flow/Webindex.php/flow3/welcome".
> This is horribly wrong. I'm using try_files for a very simple rewrite rule.
> my server code is
> server {
> listen 80;
> server_name dev.flow3.local;
>
> location / {
> root html/flow3/Web;
> index index.php;
> try_files $uri $uri/ index.php$uri;
- try_files $uri $uri/ index.php$uri;
+ try_files $uri $uri/ /index.php$uri;
> }
> error_page 500 502 503 504 /50x.html;
>
> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
> location ~ \.php$ {
- location ~ \.php$ {
+ location ~ \.php($|/) {
+ fastcgi_split_path_info ^(.+\.php)(.*)$;
> root html/flow3/Web;
> fastcgi_connect_timeout 120;
> fastcgi_send_timeout 180;
> fastcgi_read_timeout 180;
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
> include fastcgi_params;
>
> }
>
> location ~ /\.ht {
> deny all;
> }
> }
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list