本文在CentOS 7.6 x64系统 + Nginx 1.6.0 + PHP 7.3.6环境下验证通过
假设simpleSamlPhp源码解压缩在/srv/www/simplesamlphp目录
Nginx的配置如下
server {
listen 82;
server_name localhost;
set $root_path '/srv/www/simplesamlphp/www';
root $root_path;
index index.php index.html index.htm;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location /simplesaml {
# Location Access and error log files.
access_log /var/log/nginx/simplesaml.access.log;
error_log /var/log/nginx/simplesaml.error.log;
# add alias root to global simple saml install
alias /srv/www/simplesamlphp/www;
index index.php;
location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
fastcgi_split_