Nginx的PHP-FPM配置转到404

时间:2018-07-18 08:43:30

标签: php nginx nginx-config

我有如下所示的nginx配置:

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass phpfpm:9000;
    fastcgi_index index.php;
    include /etc/nginx/fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param PHP_VALUE "max_execution_time = 1200
                             max_input_time = 1200
                             memory_limit = 64M";
    fastcgi_read_timeout 1200;
  }

当我转到“ http://serverip/”时,这是完美的工作方式。但是我想在调用“ http://serverip/sublocation/”时更改此配置以获取站点。我尝试了一些更改,但所有更改都转到404。我该怎么办?

0 个答案:

没有答案