PHP, Nginx are all installed, configured for a long time is not right. It's just a good whole.
Nginx.conf began to be
server {listen 8080;
server_name localhost;
#charset Koi8-r;
Access_log Logs/host.access.log Main;
root/users/yangshuo/work/index.php;
Location/{root HTML;
Index index.html index.htm index.php;
} error_page 404/404.html;
Error_page 403/error/403.html;
# REDIRECT Server error pages to the static page/50x.html # Error_page 502 503 504/50x.html;
Location =/50x.html {root html; } location ~. *\.
(Eot|otf|ttf|woff) $ {root html;
Add_header Access-control-allow-origin *; # 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 $document _root$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;
}
}
later changed to
server {listen 8080;
server_name localhost;
root/users/yangshuo/work/index.php;
Index index.php index.html;
#charset Koi8-r;
#access_log Logs/host.access.log Main;
Location/{try_files $uri $uri//index.php $args;
} #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$ {#
Proxy_pass http://127.0.0.1;
# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ {
root/users/yangshuo/work/index.php;
Fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php; Fastcgi_paraM Script_filename $document _root$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;
#}
}
Restart and then visit it.
Add index.