Installing simpleSAMLphp on a shared hosting enviornment

1,008 views
Skip to first unread message

George

unread,
Oct 15, 2008, 7:09:52 AM10/15/08
to simpleSAMLphp
Hi

I tried to install the newer version of simpleSAMLphp. It seems that
it cannot be installed on a shared hosting enviornment unless I find a
way to set a <VirtualHost> in the .htaccess file rather than in
httpd.conf file...Is this true?

Hence, I tried installing the previous version but I'm getting an XML
error:

Unable to sign XML response. Please ensure that xmlsec is installed,
and check your keys.

Keys should be OK...I installed xmlsec however I'm not sure if the
commad to run it is good. I'm using this code:

$cmd = '/home2/gozosemi/keys/libxmlsec/bin/xmlsec sign --privkey-pem
' . $privKey .
' --pubkey-der ' . $pubKey . ' --output ' .
$tempFileName .
'.out ' . $tempFileName;

The only thing that I changed from the sample code is the path for
xmlsec.

Any help will be much appreciated as I've been trying to make this
work for the past month or so.

Thanks and regards.

Andreas Åkre Solberg

unread,
Oct 15, 2008, 9:23:36 AM10/15/08
to simple...@googlegroups.com

On 15. okt.2008, at 13:09, George wrote:

> Hi
>
> I tried to install the newer version of simpleSAMLphp. It seems that
> it cannot be installed on a shared hosting enviornment unless I find a
> way to set a <VirtualHost> in the .htaccess file rather than in
> httpd.conf file...Is this true?

Hmm, should not be neccessary...

Have you tried using Alias in .htaccess? I'm not sure if that work

If not, you could just put simplesamlphp in a directory that is
exposed on web, and go to the url.

Are you setting up an SP or IdP or both?

Andreas


>
>
> Hence, I tried installing the previous version but I'm getting an XML
> error:
>
> Unable to sign XML response. Please ensure that xmlsec is installed,
> and check your keys.
>
> Keys should be OK...I installed xmlsec however I'm not sure if the
> commad to run it is good. I'm using this code:
>
> $cmd = '/home2/gozosemi/keys/libxmlsec/bin/xmlsec sign --privkey-pem
> ' . $privKey .
> ' --pubkey-der ' . $pubKey . ' --output ' .
> $tempFileName .
> '.out ' . $tempFileName;
>
> The only thing that I changed from the sample code is the path for
> xmlsec.
>
> Any help will be much appreciated as I've been trying to make this
> work for the past month or so.

--
Andreas Åkre Solberg
=andreas
http://rnd.feide.no

George Farrugia

unread,
Oct 15, 2008, 9:41:28 AM10/15/08
to simple...@googlegroups.com
Thank you for your prompt reply.
 
I'm trying to set simpleSAMLphp as an IdP for Google Apps for Education. Currently I'm still trying to get the demo work on my hosting account which runs Apache version 2.2.9 (Unix) and PHP 5.2.6...obviously since it is a shared hosting enviornment I do not have access to the root folders.
 
I actually tried the whole VirtualHost code in .htaccess but it did not work as it is not supported there. I will check on Alias...
 
 
2008/10/15 Andreas Åkre Solberg <andreas...@uninett.no>



--
George
____________________________
www.isgozo.com

Peter Schober

unread,
Oct 15, 2008, 9:45:10 AM10/15/08
to simple...@googlegroups.com
* George Farrugia <gfa...@gmail.com> [2008-10-15 15:41]:

> I actually tried the whole VirtualHost code in .htaccess but it did
> not work as it is not supported there. I will check on Alias...

That won't work either: "Context: server config, virtual host"
http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias

Like Andreas already pointed out, you just extract the software to
some place that is accessible by the webserver.

Cheers,
-peter

--
peter....@univie.ac.at - vienna university computer center
Universitaetsstrasse 7, A-1010 Wien, Austria/Europe
Tel. +43-1-4277-14155, Fax. +43-1-4277-9140

George Farrugia

unread,
Oct 15, 2008, 9:53:48 AM10/15/08
to simple...@googlegroups.com
Thanks Peter.
 
Will it be secure if I do so? Also, if I do so, I assume that I shall ignore the section titled "Configuring Apache" in the documentation and set the path of 'baseurlpath' in the config.php to the location where simpleSAMLphp is installed...am I correct?

2008/10/15 Peter Schober <sp+lists....@univie.ac.at>

Peter Schober

unread,
Oct 15, 2008, 10:51:45 AM10/15/08
to simple...@googlegroups.com
* George Farrugia <gfa...@gmail.com> [2008-10-15 15:54]:

> Will it be secure if I do so? Also, if I do so, I assume that I shall ignore
> the section titled "Configuring Apache" in the documentation and set the
> path of 'baseurlpath' in the config.php to the location where simpleSAMLphp
> is installed...am I correct?

See http://rnd.feide.no/content/installing-simplesamlphp
The 'www' directory from simpleSAMLphp needs to be accessible to the
webserver, so goes into your public_html/ folder (or whatever it
is called on your hosting provider).
'baseurlpath' would need to match the URL where this 'www' foler is
visible to the webbrowser. e.g. if you move/rename the 'www' folder to
~/public_html/simplesaml this would be something like
'baseurlpath' => '/~user12345/simplesaml/'

At least from my reading of the docs.
cheers,
-peter

George Farrugia

unread,
Oct 15, 2008, 5:41:26 PM10/15/08
to simple...@googlegroups.com
Thanks Peter.
 
I installed simpleSAMLphp in my public_html folder (~/public_html/simplesaml/) and set the basedir and baseurlpath as follows:
 
'basedir' => '~/public_html/simplesaml/'
 
'baseurlpath'           => 'simplesaml/www/'
 
and things work fine.
 
Then I moved contents (except 'simplesaml/www/') to a folder outside the public_html folder (var) and changed the basedir to 'basedir' => '~/var/simplesaml/'. But now I'm getting an error saying that files cannot be found...i.e. the wrong paths are being used:
 
Warning: require_once(/~/public_html/simplesaml/lib/_autoload.php) [function.require-once]: failed to open stream: No such file or directory in /~/public_html/simplesaml/www/_include.php on line 23

Fatal error: require_once() [function.require]: Failed opening required '/~/public_html/simplesaml/lib/_autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /~/public_html/simplesaml/www/_include.php on line 23

I guess it's just a matter of getting basedir and baseurlpath right but I'm not sure what they should be!!! Any ideas will be most welcome.
 
Thanks again for your continous help and support.
 
Regards
 
George
2008/10/15 Peter Schober <sp+lists....@univie.ac.at>

Atle Johansen

unread,
Oct 16, 2008, 2:17:44 AM10/16/08
to simple...@googlegroups.com
Hi

Try and install the contents of your "simplesamlphp" directory directly into the home folder "~".
The folders will then not be accessable from the webserver.
Then move the contents of www -> public_html to make this folder reachable by the webserver.
Now it should work with the following config:

'basedir'          => '~/'
'baseurlpath'    => 'public_html/'

Best regards
Atle Johansen

George Farrugia skrev:

Atle Johansen

unread,
Oct 16, 2008, 2:20:55 AM10/16/08
to simple...@googlegroups.com
Sorry, my bad.
I guess the baseurlpath should be just "/"




Atle Johansen skrev:

Andreas Åkre Solberg

unread,
Oct 16, 2008, 3:18:52 AM10/16/08
to simple...@googlegroups.com
On 15. okt.2008, at 23:41, George Farrugia wrote:

Warning: require_once(/~/public_html/simplesaml/lib/_autoload.php) [function.require-once]: failed to open stream: No such file or directory in /~/public_html/simplesaml/www/_include.php on line 23

Fatal error: require_once() [function.require]: Failed opening required '/~/public_html/simplesaml/lib/_autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in/~/public_html/simplesaml/www/_include.php on line 23


I guess it's just a matter of getting basedir and baseurlpath right but I'm not sure what they should be!!! Any ideas will be most welcome.
 
Thanks again for your continous help and support.

I'll update the documentation to in detail describe your scenario. Will post updated documentation and let you know how to proceed within an hour or so... Hold on....

Kind regards,
Andreas

Andreas Åkre Solberg

unread,
Oct 16, 2008, 3:44:50 AM10/16/08
to simple...@googlegroups.com, George

On 16. okt.2008, at 09:18, Andreas Åkre Solberg wrote:

>
> I'll update the documentation to in detail describe your scenario.
> Will post updated documentation and let you know how to proceed
> within an hour or so... Hold on....

Hi again.

I've updated the section on how to setup simpleSAMLphp in a hosted
environment with more details. Everything you need to know, should be
included there. If not, let us know.

Let us hear if this documentation section helps you out:
http://rnd.feide.no/content/installing-simplesamlphp#sect.altlocations

Kind regards

Andreas Åkre Solberg

unread,
Oct 16, 2008, 4:01:43 AM10/16/08
to simple...@googlegroups.com

On 16. okt.2008, at 08:20, Atle Johansen wrote:

> Sorry, my bad.
> I guess the baseurlpath should be just "/"


If your in your home directory, it will be like '~/andreas/simplesaml'

if you do it this way
mv simplesamlphp/www ~/public_html/simplesaml

Andreas

George Farrugia

unread,
Oct 16, 2008, 11:29:00 AM10/16/08
to simple...@googlegroups.com
Thank you for your work.
 
The documentation is very helpfull but still I'm not 100% there yet...When testing, the installation page is loaded but it is in plain text....no pictures and no layout...my guess is that the path to the templates directory needs to be changed. Am I right?
Regards
 
George
 
2008/10/16 Andreas Åkre Solberg <andreas...@uninett.no>



--
George
____________________________
www.isgozo.com

Andreas Åkre Solberg

unread,
Oct 16, 2008, 2:06:34 PM10/16/08
to simple...@googlegroups.com

On 16. okt.2008, at 17:29, George Farrugia wrote:

> Thank you for your work.
>
> The documentation is very helpfull but still I'm not 100% there
> yet...When testing, the installation page is loaded but it is in
> plain text....no pictures and no layout...my guess is that the path
> to the templates directory needs to be changed. Am I right?

Probably it is related to the baseurlpath.

Can you please tell me your configured:
- baseurlpath, and
- the full URL where you have the home page of your simplesamphp
installation. In example: http://foo.com/~bar/baz
?

George Farrugia

unread,
Oct 16, 2008, 3:33:21 PM10/16/08
to simple...@googlegroups.com
'baseurlpath'           => '/home2/gozosemi/simplesaml/',

the url is: http://www.gozoseminary.com/simplesaml/

simplesamphp is inatalled at /home2/gozosemi/simplesamlphp/

Thanks.


2008/10/16 Andreas Åkre Solberg <andreas...@uninett.no>



--
George
____________________________
www.isgozo.com

Andreas Åkre Solberg

unread,
Oct 16, 2008, 4:54:45 PM10/16/08
to simple...@googlegroups.com
On 16. okt.2008, at 21:33, George Farrugia wrote:

'baseurlpath'           => '/home2/gozosemi/simplesaml/',

the url is: http://www.gozoseminary.com/simplesaml/

Then baseurlpath should be: 'simplesaml/'

simplesamphp is inatalled at /home2/gozosemi/simplesamlphp/

George Farrugia

unread,
Oct 16, 2008, 5:42:54 PM10/16/08
to simple...@googlegroups.com
Thank you for your continuous help and support.
 
I misinterpreted the ~, thought it meant the whole path...
 
Thank you once more and keep up your excellent work.
 
Regards

George
 
 
2008/10/16 Andreas Åkre Solberg <andreas...@uninett.no>



--
George
____________________________
www.isgozo.com

Andreas Åkre Solberg

unread,
Oct 16, 2008, 5:45:00 PM10/16/08
to simple...@googlegroups.com
On 16. okt.2008, at 23:42, George Farrugia wrote:

Thank you for your continuous help and support.
 
I misinterpreted the ~, thought it meant the whole path...

I understand. I'll look at how I can make that more clear in the doc.

Seems like http://www.gozoseminary.com/simplesaml/ is working better now. Congratulations.

 Thank you once more and keep up your excellent work.

George Farrugia

unread,
Oct 23, 2008, 11:18:40 AM10/23/08
to simple...@googlegroups.com
Hi again,
 
http://www.gozoseminary.com/simplesaml/ is working better now...but I'm still having problems to set up simpleSAMLphp as an IdP for Google Apps for Education. Of main concern are the Authentication modules...I cant understand what I need to do to set LDAP and which module I should use. The documentation is not very clear for a novice like me so once again any insight on these problems will be much appreciated...
 
Thanks in advance.
 
George

2008/10/16 Andreas Åkre Solberg <andreas...@uninett.no>



--
George
____________________________
www.isgozo.com

Andreas Åkre Solberg

unread,
Nov 4, 2008, 7:14:29 AM11/4/08
to simple...@googlegroups.com

On 23. okt.2008, at 17:18, George Farrugia wrote:

Hi again,
 
http://www.gozoseminary.com/simplesaml/ is working better now...but I'm still having problems to set up simpleSAMLphp as an IdP for Google Apps for Education. Of main concern are the Authentication modules...I cant understand what I need to do to set LDAP and which module I should use. The documentation is not very clear for a novice like me so once again any insight on these problems will be much appreciated...

In your IdP entry in saml20-idp-hosted have you configured auth to be 'auth/login.php', like this?
'auth' => 'auth/login.php'

If so, next step would be to configure your LDAP authentication module. Have you edited config/ldap.php?
Reply all
Reply to author
Forward
0 new messages