Skip to content

Instantly share code, notes, and snippets.

@alfchee
Created July 14, 2018 18:18
Show Gist options
  • Save alfchee/b6ae847bd5200ae31795a7884afd2a8b to your computer and use it in GitHub Desktop.
Save alfchee/b6ae847bd5200ae31795a7884afd2a8b to your computer and use it in GitHub Desktop.
Simple SAML PHP configuration, to incluse SimpleSAMLPHP as part of your domain.com/simplesaml
{
listen 80;
server_name mydomain.com;
location ^~ /simplesaml {
alias /var/simplesamlphp/www;
location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$phpfile;
# Must be prepended with the baseurlpath
fastcgi_param SCRIPT_NAME /simplesaml$phpfile;
fastcgi_param PATH_INFO $pathinfo if_not_empty;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment