Difference between revisions of "SimpleSAMLphp installation"
Karl Jones (Talk | contribs) (→Installing simpleSAMLphp in alternative locations) |
Karl Jones (Talk | contribs) (→See also) |
||
Line 120: | Line 120: | ||
* [[SimpleSAMLphp]] | * [[SimpleSAMLphp]] | ||
+ | |||
+ | |||
+ | [[Category:PHP]] | ||
+ | [[Category:SimpleSAMLphp]] |
Latest revision as of 18:31, 24 April 2016
SimpleSAMLphp installation is the installation of SimpleSAMLphp.
See also SimpleSAMLphp integration.
Contents
Installing simpleSAMLphp in alternative locations
There may be several reasons why you want to install simpleSAMLphp in an alternative way.
You are installing simpleSAMLphp in a hosted environment where you do not have root access, and cannot change Apache configuration.
Still you can install simpleSAMLphp -- keep on reading.
You have full permissions to the server, but cannot edit Apache configuration for some reason, polictics, policy or whatever.
The SimpleSAMLphp code contains one folder named simplesamlphp
.
In this folder there are a lot of subfolders for library, metadata, configuration and much more.
One of these folders is named www
. This and only this folder should be exposed on the web.
The recommended configuration is to put the whole simplesamlphp
folder outside the webroot, and then link in the www
folder by using the Alias directive, as described in the section called [Configuring Apache] (TO DO: add link).
But this is not the only possible way.
As an example, let's see how you can install simpleSAMLphp in your home directory on a shared hosting server.
Extract the simpleSAMLphp archive in your home directory:
cd ~ tar xzf simplesamlphp-1.x.y.tar.gz mv simplesamlphp-1.x.y simplesamlphp
Then you can try to make a symlink into the public\_html directory
.
cd ~/public_html ln -s ../simplesamlphp/www simplesaml
Next, you need to update the configuration of paths in simplesamlphp/config/config.php
:
And, then we need to set the baseurlpath
parameter to match the base path of the URLs to the content of your www
folder:
'baseurlpath' => '~andreas/simplesaml/',
Now, you can go to the URL of your installation and check if things work:
http://yourcompany.com/~andreas/simplesaml/
Symlink may fail
Symlinking may fail, because some Apache configurations do not allow you to link in files from outside the public_html
folder.
If so, move the folder instead of symlinking:
cd ~/public_html mv ../simplesamlphp/www simplesaml
Now you have the following directory structure:
~/simplesamlphp ~/public_html/simplesaml where simplesaml is the www directory from the simplesamlphp installation directory, either moved or a symlink.
This requires a few configuration changes.
First, edit ~/public_html/simplesaml/_include.php
:
Change the two lines from:
require_once(dirname(dirname(__FILE__)) . '/lib/_autoload.php');
to something like:
require_once('/home/andreas/simplesamlphp/lib/_autoload.php');
And then at the end of the file, you need to change another line from:
$configdir = dirname(dirname(__FILE__)) . '/config';
to:
$configdir = '/home/andreas/simplesamlphp/config';
Source:
Broken link
"... as described in the section called “Configuring Apache”."
Typographic error
- The reccomended configuration is to put the whole simplesamlphp folder outside the webroot, and then link in the www folder by using the Alias directive,
as described in the section called “Configuring Apache”.