是静态资源不存在时出现TP的错误,不是访问模块,我把nginx配置发出来大家帮忙指点一下
静态资源正确的时候则正常。
server {
listen 80;
server_name ooxx.com;
index index.php index.html;
error_log /var/www/ooxx.com/logs/error.log;
access_log /var/www/ooxx.com/logs/access.log;
root /var/www/ooxx.com/public;
location / {
#try_files $uri $uri/ /index.php?s=$args;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
location ~\.php$ {
#try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
最佳答案
