我正在安装wnmp使用此链接
http://github.com/Xeoncross/wnmp
我遵循指令,但我得到这是我从nginx错误日志中得到的错误。
日志
1 upstream sent unsupported FastCGI protocol version: 70 while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"
inheritance我的文件夹
- wnmp - memcached - mysql - nginx - php - www
我的nginx.conf
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root ../www; index index index.html index.htm index.php; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root ../www; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME ../www$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443; # server_name localhost; # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols SSLv2 SSLv3 TLSv1; # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }
顺便说一句,start.bat
@ECHO OFF REM Windows The following is not valid REM set PHP_FCGI_CHILDREN=5 REM Each process handles the maximum number of requests, or is set to Windows Environment variables set PHP_FCGI_MAX_REQUESTS=1000 :: Start PHP-fastcgi on port 9000 RunHiddenConsole php\php-cgi.exe -b 127.0.0.1:9000 -c php\php.ini :: Start MySQL using the mysql\my.ini config file start mysql\bin\mysqld :: Start Memcached (m = memory to use in MB, c = max connections allowed) RunHiddenConsole memcached\memcached.exe -m 10 -c 1024 :: Start the nginx server cd nginx start nginx EXIT
如果有什么你需要请评论
感谢您的注意
亚当·拉马丹
我也有这个问题。 发现另一个应用程序正在监听端口9000,当我开始php-cgi.exe。 看来,PHP的CGI.EXE不报告这一点。
在我的情况下,不pipe你是否信任在端口9000上的“E Text-Editor”,我都可以通过运行(在Win7上提升)来发现这个问题:
netstat -a -b -n
(可执行的监听在端口行之后显示)
所以,杀死其他应用程序解决了这个问题,改变端口号是一个更长远的解决scheme:)对我来说,无论如何!