fastcgi_index index.php; // 设置fastcgi_index指令为index.php fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } 在上述代码中,将fastcgi_index指令设置为index.php。这意味着当Nginx接收到FastCGI请
index index.html index.php; try_files $uri $uri/ /index.php?$query_string; } location ~ .php$ { fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_intercept_errors on...
location / { index index.html index.htm index.php; } #所有php后缀的,都通过fastcgi发送到1025端口上 #上面include的fastcgi.conf在此应该是有作用,如果你不include,那么就把 fastcgi.conf的配置项放在这个下面。 location ~ .php$ { fastcgi_pass 127.0.0.1:1025; } } #这个是反向代理的例子 server { #...