Library installation, 404 not found

70 views
Skip to first unread message

Kudzo ELO

unread,
Apr 15, 2024, 8:41:08 AM4/15/24
to SimpleSAMLphp
Hello everyone,

I am trying to install simplesamlphp v2.2.1. I have a redhat server with apache 2.4.57 and php-fpm installed. I have not added the alias from the configuration page. When trying to go directly to the url : https://mywebsite.com/simplesamlphp/public I am redirected to 
https://mywebsite.com/simplesamlphp/public/module.php/core/welcome and then I  get a 404 Not Found, The requested URL was not found on this server.. It seems like apache is not able to handle the url without ".php" at the end? Has anyone faced this issue?

Thanks.

Peter Schober

unread,
Apr 15, 2024, 9:55:41 AM4/15/24
to simple...@googlegroups.com
Kudzo ELO <elok...@gmail.com> [2024-04-15 14:41 CEST]:
> I have not added the alias from the configuration page. When trying
> to go directly to the url :
> https://mywebsite.com/simplesamlphp/public

Note that you're exposing SimpleSAMLphp's base directory to the web
server that way, which is insecure. Instead only expose the 'public'
subdirectory to the web server.

> It seems like apache is not able to handle the url without ".php" at
> the end?

That's easy to test using any PHP file of your choice (e.g. one with
"<? phpinfo();" as its only content) and also completely independent
from SimpleSAMLphp.
(That's good for you since it also means that any answers you can find
on the web regarding PHP files not being processed/found/etc. will
also be applicable to your case, not only the very little information
that's specific to the SimpleSAMLphp software.)

Best,
-peter

Peter Schober

unread,
Apr 15, 2024, 10:02:49 AM4/15/24
to simple...@googlegroups.com
Kudzo ELO <elok...@gmail.com> [2024-04-15 14:41 CEST]:
> I get a 404 Not Found, The requested URL was not found on this server.. It
> seems like apache is not able to handle the url without ".php" at
> the end?

Well, does it only seem that way or is it the case?

Are PHP files being found and processed as expected when you add
".php" to the URL in your web browser, e.g. with a test PHP file such
as the one I mentioned in my previous post?

If the PHP resource can be found/processed with the complete file name
provided as part of the URL (including ".php") check the value of the
DirectoryIndex directive in your Apache httpd configuration.
(Adding "index.php" somewhere after "index.html" would be a possible
fix, then.)

-peter

Tim van Dijen

unread,
Apr 15, 2024, 10:09:03 AM4/15/24
to SimpleSAMLphp
What Peter said..
The alias is used so that https://mywebsite.com/simplesaml will point to your SimpleSAMLphp-installation.
If you change this to https://mywebsite.com/whatever/youwant, you will also have to update the `baseurlpath` setting in config.php.

- Tim


Op maandag 15 april 2024 om 15:55:41 UTC+2 schreef Peter Schober:

Kudzo ELO

unread,
Apr 15, 2024, 10:51:44 AM4/15/24
to SimpleSAMLphp
Thanks everyone, I have added the alias to my apache configuration, there was other proxymatch settings causing problems. It is all good now!
Reply all
Reply to author
Forward
0 new messages