宝塔linux面板 解决TP3.2 404

 

在配置文件中加入一下配置:

location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1;
}
}
location ~ \.php {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi_params;

set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}


登陆入口查看: /etc/init.d/bt default

posted on 2019-02-20 10:46  Ben丶大壮  阅读(734)  评论(0编辑  收藏  举报

导航