Using SimpleSAMLPHP with Laravel Valet

Open your ~/.valet/Nginx/{site}.dev

Add the following and replace PATH_TO where ever you installed Simple SAML.

location  /simplesaml {
  alias PATH_TO/simplesamlphp/www;
  location ~ .php(/|$) {
    fastcgi_split_path_info ^(.+?.php)(/.+)$;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_pass unix:/Users/YOUR_USERNAME/.valet/valet.sock;
    fastcgi_index index.php;
    include fastcgi_params;
  }
}

Run valet restart

Published by

Toby Schrapel

WordPress consultant & developer

2 thoughts on “Using SimpleSAMLPHP with Laravel Valet”

  1. Hello! I’ve got a folder `saml` with `simplesamlphp` inside.
    I added to my `~/.valet/Nginx/saml.dev` following code:
    “`
    location /simplesaml {
    alias /Users/myaccount/projects/saml/simplesamlphp/www
    location ~ .php(/|$) {
    fastcgi_split_path_info ^(.+?.php)(/.+)$;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_pass unix:/Users/myaccount/.valet/valet.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    }
    }
    “`
    But now valet give me 403 error. What I did wrong? Thanks
    What does `PATH_TO` mean?

Leave a Reply

Your email address will not be published. Required fields are marked *