ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

помогите настроить ngnix + php fastcgi на windows xp



Привет, хочу настроить веб-сервер на локальном пк, на котором windows xp home 
sp3.
Для этого скачал nginx/Windows-0.8.33 распаковал в папку c:\dev\nginx
Скачал PHP 5.2.12 zip package, распаковал в c:\dev\php
Создал bat-файл start-php-fcgi.bat для запуска php-cgi.exe:

@ECHO OFF
ECHO Starting PHP FastCGI...
set PATH=C:\dev\php;%PATH%
set PHP_FCGI_MAX_REQUESTS=0

php-cgi.exe -b 127.0.0.1:9123 


nginx.conf:

worker_processes  1;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;
        root c:\dev\ngnix\www;

         error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

 
location / {
  root c:\dev\ngnix\www;
  index index.php;
}
 
location ~ \.php$ {
  fastcgi_pass   127.0.0.1:9123;
  fastcgi_index  index.php;
  fastcgi_param  SCRIPT_FILENAME  c:\dev\nginx\www$fastcgi_script_name;
  include        fastcgi_params;
}

    }
}


В файле c:\dev\nginx\www\index.php поместил:

<? echo 'hello!'; ?>



Запускаю так: сначала start-php-fcgi.bat, потом nginx.exe
Ввожу в браузере http://127.0.0.1/
Выводит: HTTP 404 - File not found

В логах access.log:

127.0.0.1 - - [05/Feb/2010:22:38:40 +0200] "GET / HTTP/1.1" 504 383 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:22:38:40 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:22:47:43 +0200] "GET / HTTP/1.1" 504 383 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:22:47:44 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:00:58 +0200] "GET / HTTP/1.1" 504 383 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:00:58 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:06:32 +0200] "GET / HTTP/1.1" 504 383 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:06:33 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:06:57 +0200] "GET / HTTP/1.1" 404 36 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:06:58 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:07:07 +0200] "GET /index.php HTTP/1.1" 404 36 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:07:07 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:07:18 +0200] "GET /www/index.php HTTP/1.1" 404 36 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:07:19 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:07:26 +0200] "GET /www/index.php HTTP/1.1" 404 36 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:07:27 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:07:31 +0200] "GET / HTTP/1.1" 404 36 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [05/Feb/2010:23:07:31 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [06/Feb/2010:00:25:28 +0200] "GET / HTTP/1.1" 404 36 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [06/Feb/2010:00:25:29 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [06/Feb/2010:00:25:31 +0200] "GET / HTTP/1.1" 404 36 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [06/Feb/2010:00:25:31 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [06/Feb/2010:00:27:41 +0200] "GET / HTTP/1.1" 404 36 "-" 
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like 
Gecko) Chrome/4.0.249.78 Safari/532.5"
127.0.0.1 - - [06/Feb/2010:00:27:42 +0200] "GET /favicon.ico HTTP/1.1" 404 571 
"-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, 
like Gecko) Chrome/4.0.249.78 Safari/532.5"



error.log:

2010/02/05 19:54:48  3332#4072: signal process started
2010/02/05 22:34:37  3512#2500: duplicate location "/" in 
C:\dev\nginx/conf/nginx.conf:63
2010/02/05 22:34:59  2104#2360: duplicate location "/" in 
C:\dev\nginx/conf/nginx.conf:63
2010/02/05 22:38:40  3120#3628: *1 upstream timed out (10060: A connection 
attempt failed because the connected party did not properly respond after a 
period of time, or established connection failed because connected host has 
failed to respond) while connecting to upstream, client: 127.0.0.1, server: 
localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9123", 
host: "localhost"
2010/02/05 22:38:40  3120#3628: *1 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost"
2010/02/05 22:47:43  3120#3628: *3 upstream timed out (10060: A connection 
attempt failed because the connected party did not properly respond after a 
period of time, or established connection failed because connected host has 
failed to respond) while connecting to upstream, client: 127.0.0.1, server: 
localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9123", 
host: "127.0.0.1"
2010/02/05 22:47:44  3120#3628: *3 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/05 23:00:58  3120#3628: *5 upstream timed out (10060: A connection 
attempt failed because the connected party did not properly respond after a 
period of time, or established connection failed because connected host has 
failed to respond) while connecting to upstream, client: 127.0.0.1, server: 
localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9123", 
host: "127.0.0.1"
2010/02/05 23:00:58  3120#3628: *5 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/05 23:05:26  2260#3644: signal process started
2010/02/05 23:06:32  3120#3628: *7 upstream timed out (10060: A connection 
attempt failed because the connected party did not properly respond after a 
period of time, or established connection failed because connected host has 
failed to respond) while connecting to upstream, client: 127.0.0.1, server: 
localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9123", 
host: "127.0.0.1"
2010/02/05 23:06:33  3120#3628: *7 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/05 23:06:58  3120#3628: *7 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/05 23:07:07  3120#3628: *7 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/05 23:07:19  3120#3628: *7 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/05 23:07:27  3120#3628: *7 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/05 23:07:31  3120#3628: *7 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/06 00:25:06  3532#464: signal process started
2010/02/06 00:25:29  3120#3628: *14 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/06 00:25:31  3120#3628: *14 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"
2010/02/06 00:26:27  3844#3092: signal process started
2010/02/06 00:27:42  3120#3628: *17 CreateFile() "C:\dev\nginx/www/favicon.ico" 
failed (2: The system cannot find the file specified), client: 127.0.0.1, 
server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1"



Posted at Nginx Forum: http://forum.nginx.org/read.php?21,51153,51153#msg-51153


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.