I tried http://www.thinkphp.cn/topic/... The actual visit reported 404
. nginx 1.10.3
php-fpm
php7.1
Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-117-generic x86room64)
this is the environment.
here is the relevant configuration of php-fpm in my apache
index index.html index.htm index.php default.html default.php index.nginx-debian.html;
-sharp if (!-e $request_filename)
-sharp {
-sharp -sharprewriteindex.php
-sharp rewrite ^/(.*)$ /index.php/$1;
-sharp -sharpsubdir
-sharp -sharprewrite ^/subdir/(.*)$ /subdir/index.php/$1;
-sharp }
-sharp location ~ .php
-sharp {
-sharp -sharp
-sharp
-sharp -sharp $path_info pathinfo
-sharp set $path_info "";
-sharp -sharp $real_script_name
-sharp set $real_script_name $fastcgi_script_name;
-sharp -sharp
-sharp if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
-sharp -sharp $real_script_name
-sharp set $real_script_name $1;
-sharp -sharp $path_info
-sharp set $path_info $2;
-sharp }
-sharp -sharpfastcgi
-sharp fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
-sharp fastcgi_param SCRIPT_NAME $real_script_name;
-sharp fastcgi_param PATH_INFO $path_info;
-sharp }
location / {
-sharp if (!-e $request_filename) {
-sharp rewrite ^/(.*)$ /index.php/$1 last;
-sharp break;
-sharp }
-sharp First attempt to serve request as file, then
-sharp as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location ~ ^(.+\.php)(.*)$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}