Last active
August 16, 2019 14:03
-
-
Save mphillips/6834a4996c1e2247a6f90351956e29d5 to your computer and use it in GitHub Desktop.
SAML 2.0 Single Sign-On WordPress Plugin Fix for Nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Edit the site's nginx config (/etc/nginx/custom-sites/site-name.conf) to add the lines below. | |
# 2) Reload nginx: sudo service nginx reload | |
server { | |
# existing conf here | |
# Nginx fix for the SAML 2.0 Single Sign-On plugin. | |
location ^~ /wp-content/plugins/saml-20-single-sign-on { | |
location ~ ^(?<script_name>.*?\.php)(?<path_info>/.*)?$ { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$script_name; | |
fastcgi_param PATH_INFO $path_info; | |
fastcgi_param PATH_TRANSLATED $document_root$path_info; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: SAML 2.0 Single Sign-On | |
Version: 0.9.4 | |
Plugin URI: http://keithbartholomew.com | |
Description: Authenticate users using <a href="http://rnd.feide.no/simplesamlphp">simpleSAMLphp</a>. | |
Author: Keith Bartholomew | |
Author URI: http://keithbartholomew.com | |
*/ | |
// Comment out this line that shouldn't be here: | |
// define('WP_DEBUG', true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment