Could you elaborate about what you mean with «"no input file" error»?
Does it come from simpleSAMLphp? What URL gives you that error? Do you
get a stack trace or anything like that?
> and if I change configurations
Change configurations in which way?
> I get a blank screen and noting happens
Have you checked your log files? I don't know where PHP logs error
when running under nginx, but presumably there is a log file somewhere?
> - seems like simplesamlphp is
> somewhat Apache bound, what I would like to suggest would be great to
> rethink - nginx is really a great peice of software!
It should not be Apache bound, but we are only testing on Apache, so
there may be bugs that means it will only work under Apache. Those bugs
should probably be fixed, but we must first determine what they are.
Regards,
Olav Morken
UNINETT / Feide
So nginx does not directly support PATH_INFO. That's a bit
disappointing, since PATH_INFO is part of the CGI specification. It
also explains the failures, since SSP relies heavily on this
functionality.
> We have
> slightly specific configuration, but the important parts look
> something
> like this:
>
> -----------
> if ($uri ~ "^/ssp/module.php(/casserver/cas|/openidProvider/user|/
> knopso/OpenID/User|/saml2/sp/logout|/saml/sp/(metadata|saml1-acs|saml2-
> acs|saml2-logout))([^\.]?.*)$") {
> set $custom_script_filename $document_root/module.php;
> set $custom_script_name /ssp/module.php;
> set $custom_path_info $1.php$3;
> }
>
> include fastcgi_params;
> fastcgi_param SCRIPT_FILENAME $custom_script_filename;
> fastcgi_param SCRIPT_NAME $custom_script_name;
> fastcgi_param PATH_INFO $custom_path_info;
> -----------
There is also an example of a configuration at:
http://wiki.nginx.org/HttpFcgiModule#fastcgi_split_path_info
That example appears to be a bit more generic, but I suspect that you
will also need to assign the SCRIPT_NAME option.
That is not an option at this point (and I don't think it was ever an
option when we decided to try to modularize SSP). We need the ability
to have one script (module.php) pass the request on to a different
script, and we cannot use query parameters to do it.
I'm not certain, but I think you need to set $_SERVER['SCRIPT_NAME']
in addition to PATH_INFO.
>
> }
>
>
> then append to config.php these lines:
>
> /*
> * Use $_SERVER['REQUEST_URI'] to generate $_SERVER['PATH_INFO']
> * This is helpful with a fastcgi deployment, where you might have
> * problems getting $_SERVER['PATH_INFO'] in en expected way
> */
> 'php.pathinfo_from_requesturi' => TRUE,
>
>
> This seems to work - but I am still not sure - however I post it here
> as a starting point. It would be much better for fastcgi deployments
> to use REQUEST_URI for path-building - currently getting SSP reliably
> working with anything else than apache is a little bit complicated -
> and the content of PATH_INFO is not reliable with Apache either!
In which case is PATH_INFO not reliable with Apache?
> - it
> would be great to have it support many different deployment scenarios
> right out of the box - what can be achieved simply by avoiding
> PATH_INFO.
>
> There are some more files containing PATH_INFO - I still have to check
> about these, but I think most functionality is not broken with the
> code above. It would be really great if you could check this for side-
> effects I might not know yet.
I think all other scripts using PATH_INFO are running under module.php,
so as long as the PATH_INFO is correct going into module.php, those
scripts will work.
> Also I found one special place that does not work with this: /core/
> authenticate.php?as=admin&logout
> This link is generated without module.php in the URI - I do not
> understand why, I did not even find the right place where this logout
> link is generated, however with the code above it should be /
> module.php/core/authenticate.php?as=admin&logout to work - all the
> other links are correctly generated with the /module.php in front. Don
> ´t know wha is wrong here... might be a little thing, but I can not
> find it.
This may be caused by the missing $_SERVER['SCRIPT_NAME'] (if it is
missing).
> Hopefully changing the other bits of the code not to be dependant on
> PATH_INFO can be very easily done based on the code above. Please,
> Olav, consider this as a quick healing and making SSP available in a
> reliable way on many different servers - would be a great help!
I think configuring nginx differently is a better approach. Since they
have added the 'fastcgi_split_path_info'-directive[1], presumably the
correct way to use PATH_INFO with nginx is to do it using that
directive.
In addition to the example present in the documentation for the
directive, I would guess that you also need to set the SCRIPT_NAME
option, using something like:
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
[1] http://wiki.nginx.org/HttpFcgiModule#fastcgi_split_path_info