採用nginx安裝owncloud私有云後,出現404頁面,需要開啓path_info功能
1、在php.ini打開,再重啓php-fpm
cgi.fix_pathinfo=1
2、配置nginx.conf
server {
……其他內容
location / {
if (!-e KaTeX parse error: Expected '}', got 'EOF' at end of input: …
rewrite ^/(.*) /index.php/$1 last;
break;
}
}
location ~ .php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
set $real_script_name fastcgi_script_name ~ “^(.+?.php)(/.+)$”) {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
……其他內容
}
}
重啓nginx即可
20190527親自測試可行
測試環境
centos7.4
nginx1.12+php7.2+mysql5.6