Running the PHP file will be an error.
The configuration file is as follows
#user nobody;worker_processes 2;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 g:/wamp/www/ecshop; Index index.html index.htm index.php; } error_page 404/404.html; # REDIRECT Server error pages to the static page/50x.hTML # Error_page 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$ {# ProX Y_pass http://127.0.0.1; #} # Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { Root g:/wamp/www; Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Fastcgi_param Script_filename G:/wamp/www/ecshop$fastcgi_script_name; #fastcgi_param script_filename $document _root$fastcgi_script_name; Include Fastcgi_params; #include fastcgi.conf; } # Deny access to. htaccess files, if Apache ' s document Root # concurs with Nginx ' s one # #lo cation ~/\.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 high:!anull:! MD5; # ssl_prefer_server_ciphers on; # location/{# root HTML; # index index.html index.htm; # } #}}
Errors are as follows
2013/01/27 21:18:59 [ERROR] 4592#4648: * Upstream timed out (10060:a connection attempt failed because the connected par Ty did not properly respond after a period of time, or established connection failed because connected host had failed to respond) while connecting to upstream, client:127.0.0.1, server:localhost, Request: "Get/index.php http/1.1", upstream: "fastcgi://127.0.0.1:9000", Host: "127.0.0.1"
Solution.
Reply to discussion (solution)
can run the. html file: Just can't run PHP
Timeout......
PHP started up no ...
It seems that the PHP-FPM process did not start, and did not run PHP under the Windows CGI, it is not very clear.
Not php-cgi.exe-d boot. I am online to watch the tutorial ...
PHP still needs to be started?
There are two ways to get PHP running in a Web environment:
1 PHP is running on the HTTP server in the DSO module mode. When HTTP server starts, it calls PHP's dynamic-link library (*.dll on Windows or *.so on Unix) to run as a module of Apache. It seems like I've used only Apache to support this approach.
2 PHP runs in CGI mode, running a process independently, occupying the 127.0.0.1:9000 port. It is then accessed through the reverse proxy of the HTTP server. Nginx seems to support this approach only, Apache two kinds are supported.
Your situation seems to be php-cgi or PHP-FPM did not start successfully.
Brother Frog ... How does the second approach be implemented? I follow the online tutorial has been unable to succeed. Tip me that port 9000 is not turned on. What tools do you have to start your own mouth?
Check it out, it is really similar to C:/php5/php-cgi.exe-b 127.0.0.1:9000-c C:/php5/php.ini to start php-cgi on Windows.
After running, Netstat-an, see if there is
Did you turn this cmd window off after you finished running?
You can't shut that off, that's the end of the process.
。。。。 It's really done. Display monitoring is the port that opened it.
The PHP page runs out of time. Looks like service is up, I went to find out what the reason. Kept on asking. No results returned.
Finally ran up. Thanks, brother Frog.
What's the reason?