Toby Schrapel WordPress Consultant & Developer

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

About the author

Toby Schrapel

Toby is a WordPress engineer & consultant, freelance full-stack developer, open source contributor and digital nomad that is currently living in Playa del Carmen, Mexico. Follow me on Twitter @tobyschrapel.

2 comments

  • 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?

Toby Schrapel WordPress Consultant & Developer

If you would like to get in touch fill out the form below or send me a Tweet.