Security and privacy

 
 
Picture of Tim van Steenbergen
Gone wrong with vhost-definition when installing simpleSAMLphp
 

Hi all, trying to install simpleSAMLphp and than install plugin SAML. Sounds easy, but no luck so far. Need help to get the browser pointing correctly to locahost/simplesaml

First thing: is it possible to use SSO via windows Azure's ACS without the SAML-plugin?

Next info on my problem: I am installing it on a window-server with XAMPP, I got "localhost" pointing fine to <C:\mydir>\server\moodle and working fine. Now I am following the installation guide on www.simplesamlphp.org/docs/stable/simplesamlphp-install#section_10
but I have no luck in getting the simplesamlphp-installation page

At step6: I copied the simplesamlphp-dir to <mydir>\server\moodle\simplesamlphp. So now I have to adjust the vhost-file. Is that server\apache\conf\extra\httpd-vhosts.conf? I think so. Apache does not need a restart after that file is modified, correct? I have entered:

<VirtualHost *>
ServerName myserver
DocumentRoot "<mydir>/server/moodle"
Alias /simplesaml simplesamlphp/www
</VirtualHost>

But my browser does not recognise "myserver/simplesaml". I have tried several values in <VirtualHost *> for servername and document-root but nothing seems to make any difference.

I have finished steps 7, 8 and 9 of the installationguide so this should be the last problem before reaching the installation-page that i desperatly long for. Any suggentions?

Best regards,
Tim van Steenbergen

 
Average of ratings: -
Picture of Ken Task
Re: Gone wrong with vhost-definition when installing simpleSAMLphp
Group Particularly helpful Moodlers

Don't use Winders myself, but vhost on Linux and Apache.  Should be similar I imagine.

First, a question .... this thing you are trying to install ... does it need to be accessed like a separate site?  http://newthing.local or just a subdirectory of the site for moodle?  http://mymoodle.local/www

Pardon, but too lazy to really read all the docks/web pages for it.

A couple of things ...

an alias is meant to be a 'shortcut pointer' to some directory that is NOT typically at the apache application root (/var/www/ on a CentOS box) but rather another location.  And it probably should NOT have spaces:

Alias /simplesaml simplesamlphp/www

and typically the name of the alias is given first, then the path is given.

should be

Alias /www C:\pathto\simplesaml\simplesamlphp

IF 'www' is to be the directory used to access this thing.

Aliases can be in virtual apache servers, but if only needing to run ONE apache server - mysite - then aliases are defined in the main config for apache.

Two resources to read up on:

Aliases

http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias

Vhost

http://httpd.apache.org/docs/2.2/vhosts/index.html

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Tim van Steenbergen
Re: Gone wrong with vhost-definition when installing simpleSAMLphp
 

Hi Ken,

Thanks for your response. Made me find the vhost-file Apache uses via "httpd -S": http_ssl.conf

"this thing you are trying to install": simplesamlphp is just a sub-dir of moodle.

 I added the alias just above <VirtualHost _default_:443> like this:
"Alias /simplesaml /simplesamlphp/www".
Does not do anything. Should make "localhost/simplesaml" go to localhost/simplesamlphp/www. Instead "localhost/simplesaml" gives me an "access denied"-message, so it does look somewhere, but not to /simplesamlphp/www (renaming dir simplesamlphp to something else makes no difference to "localhost/simplesaml")

I also tried adding it to the httpd.conf itself, but nothing ever changes in the response to"localhost/simplesaml".

Any idea? Tim

 

 

 
Average of ratings: -
Picture of Ken Task
Re: Gone wrong with vhost-definition when installing simpleSAMLphp
Group Particularly helpful Moodlers

Ok, I finally was forced to go read: http://simplesamlphp.org/docs/stable/simplesamlphp-install

It's not a plugin to Moodle but a separate service to itself.  You say you already have localhost working.  And that the URL to moodle is localhost/moodle/.  To do that, you did NOT have to set up virtual host.  Moodle folder is being served out just fine.   This other app recommends you run virtual apache ... virtual apache will work ONLY WITH DNS that functions ... localhost to ANY machine connected to the internet means IP is 127.0.0.1 (the loopback IP of ALL machines of typical configuration on the Internet).  The only other way to get localhost to respond with Virtual apaches by another host is to edit your hosts file and manually enter a 127.0.0.1 IP mapped to a simplesami.localhost server as well.

So suggest to you, that installing this as a subdirectory at the same level as the moodle folder is perhaps the easiest way to go.  According to their install docs: You may choose another location, but this requires a path update in a few files. See Appendix for details ‹Installing simpleSAMLphp in alternative locations›.

You then don't have to attempt to configure virtual hosting for localhost.

BTW, the docs to that thing show linux and you are using Windows? Wouldn't it be best to set it up on Linux for testing?   You could run Ubuntu/CentOS ... or almost any Linux distro ... in a VirtualBox virtual environment and then you'd be working in the VERY SAME environment as your production server.  Think that would be a more accurate testing environment - especially for something like this.

Since this really isn't Moodle related, does the provider of this thing have a forum of their own?  Or contact information?  If so, suggest your best advise will come from there/them.

my 2 cents.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Tim van Steenbergen
Re: Gone wrong with vhost-definition when installing simpleSAMLphp
 

Hi Ken,

Thanks. Correct: simplesamlphp is a separate piece of software. I managed to install it now and am at the installation page. Later I will continue. Thanks for your time and effort.

Best regards,
Tim van Steenbergen

 
Average of ratings: -