Welcome! Log In Create A New Profile

Advanced

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

February 05, 2010 05:53PM
Привет, хочу настроить веб-сервер на локальном пк, на котором 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:
[code]
@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
[/code]

nginx.conf:
[code]
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;
}

}
}
[/code]

В файле c:\dev\nginx\www\index.php поместил:
[code]
<? echo 'hello!'; ?>
[/code]


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

В логах access.log:
[code]
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"

[/code]

error.log:
[code]
2010/02/05 19:54:48 [notice] 3332#4072: signal process started
2010/02/05 22:34:37 [emerg] 3512#2500: duplicate location "/" in C:\dev\nginx/conf/nginx.conf:63
2010/02/05 22:34:59 [emerg] 2104#2360: duplicate location "/" in C:\dev\nginx/conf/nginx.conf:63
2010/02/05 22:38:40 [error] 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 [error] 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 [error] 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 [error] 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 [error] 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 [error] 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 [notice] 2260#3644: signal process started
2010/02/05 23:06:32 [error] 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 [error] 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 [error] 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 [error] 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 [error] 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 [error] 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 [error] 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 [notice] 3532#464: signal process started
2010/02/06 00:25:29 [error] 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 [error] 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 [notice] 3844#3092: signal process started
2010/02/06 00:27:42 [error] 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"

[/code]
Subject Author Posted

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

smack87 February 05, 2010 05:53PM

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

smack87 February 06, 2010 08:15AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 243
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready