Warning: getimagesize(): open_basedir restriction in effect. File(/etc/pki/tls/certs/ca-bundle.crt) is not within the allowed path(s): (/www/wwwroot/rinvay.cc/:/tmp/) in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 469

Warning: failed loading cafile stream: `/etc/pki/tls/certs/ca-bundle.crt' in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 469

Warning: getimagesize(): Failed to enable crypto in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 469

Warning: getimagesize(https://www.rinvay.cc/img/logo.png): failed to open stream: operation failed in /www/wwwroot/rinvay.cc/usr/plugins/AMP/Action.php on line 469
LNMP环境 pathinfo设置

Rinvay.H Blog

LNMP环境 pathinfo设置

打开域名配置文件,一般位于/usr/local/nginx/conf/vhost/目录下:

取消掉其中的#注释:

#include pathinfo.conf;

再把下面第一行代码,替换成第二代码:

location ~ [^/]\.php(/|$) #原始代码
location ~ .*\.php #替换为这个

然后,备份原来的pathinfo.conf文件,使用以下代码替换:

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;

重新加载nginx设置 /etc/init.d/nginx reload

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »