See the process, Nginx, php-fpm are running, to eliminate the program error, then is the configuration problem.
A possible error is due to the Fastcgi_pass configuration in the configuration is wrong
The error is configured as follows
Server {Listen80; server_name localhost; #CharSet koi8-r; #Access_log/var/log/nginx/log/host.access.log main; Location~ \.php$ {root/usr/share/nginx/html; Fastcgi_pass 127.0.0.1:80; Fastcgi_index Index.PHP; Fastcgi_param Script_filename$document _root$fastcgi_script_name; includeFastcgi_params; Index index.PHP; } location/{root/usr/share/nginx/html; Index index.html; } #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/usr/share/nginx/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 html; #Fastcgi_pass 127.0.0.1:9000; #Fastcgi_index index.php; #Fastcgi_param Script_filename/scripts$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; #} }
Marked red place, I thought is port, but is not, specifically should be PHP-FPM processing PHP script Port bar, change to
Fastcgi_pass 127.0.0.1:9000
Location/{ root/usr/share/nginx/html; Index index.html; }
The first time to make Nginx, encountered a lot of problems, records of
Nginx Error: Sorry, the page you were looking for is currently unavailable. Please try again later.