SimpleSAMLphp admin page shows using HTTP but not HTTPS - php

When I go here, the SimpleSAMLphp page appears: http://localhost/simplesaml/
When I go here, a 404 "not found" page appears: https://localhost/simplesaml/
httpd.conf file:
<VirtualHost *>
DocumentRoot "C:/xampp/htdocs"
SetEnv SIMPLESAMLPHP_CONFIG_DIR "C:\xampp\simplesamlphp\config"
Alias /simplesaml C:\xampp\simplesamlphp\www\
<Directory C:\xampp\simplesamlphp\www>
Require all granted
</Directory>
</VirtualHost>
I've verified that all other documents are working when accessed via HTTPS; it's only the SimpleSAMLphp admin page that is giving a 404. I have a feeling it has something to do with the alias, but I'm unsure.

For anyone from the future: try recreating your app in your IdP.
In our case, we recreated our app registration in Azure AD. We are not sure what the difference is -- as we exactly followed the same steps the second time -- but the issue was resolved.
So, the answer is that SimpleSAMLphp did not have an issue at all; the issue was on the IdP side.

Related

SimplesamlPHP configuration

I’m new to SSO and trying to set up simplesamlphp on an existing Windows, PHP/MySQL server. I have installed the latest version of simplesamlphp, and followed the configuration instructions on the simplesaml.org site, including setting up the VirtualHost in the Apache config file, setting the basurlpath, auth.password, secretsalt and technical contact info in the simplesaml config file. At this point, I am able to load the frontpage_federation.php page, but when I try to log in as administrator, the process times out. I get an error message saying the site can’t be reached, and the site took too long to respond. Has anyone experienced this before & can you give me some ideas on what mistake(s) I am making in my configuration?
httpd.conf
<VirtualHost *>
ServerName service.example.corp:8080
DocumentRoot G:/localhost/simplesamlphp/www/service.example.corp
SetEnv SIMPLESAMLPHP_CONFIG_DIR G:/localhost/simplesamlphp/config
Alias /simplesaml G:/localhost/simplesamlphp/www
<Directory G:/localhost/simplesamlphp/www>
Require all granted
</Directory>
</VirtualHost>
config.php
'baseurlpath' => 'https://service.example.corp:8080/simplesaml/',
I'm guessing that something goes wrong in redirecting you after you've entered credentials and that you end up on a URL without that port number. Your browser's web development toolbar, or the excellent SAML Tracer browser extension, should be able to confirm what requests are sent to what exact URLs. That will likely help to pinpoint your problem.

New Laravel routes showing XAMPP 404 error

I seem to have the problem since today when I wanted to add a new route to a project I have been working on for the past months where XAMPP shows me 404 errors.
I have tried looking everywhere, reinstalled XAMPP, reinstalled my project from github.
The route actually works on other people's computers on the same branch in my repo. making a new route in another project also works.
It's just that in this project XAMPP has decided to take over the error handling from Laravel and give me 404 errors on all new routes I make?
I just can't get into the controller or do anything with the route. I tried changing the route into anything and everything I could think of or find.
Not Found
The requested URL was not found on this server.
Apache/2.4.47 (Win64) OpenSSL/1.1.1k PHP/8.0.6 Server at 360feedback.hz.nl Port 443
*edit: I am using VirtualHost, which has always worked without issues.
every existing route works fine, route:clear does nothing.
Does anyone know what could cause this?
Another edit as i have found out some more things.
So this problem only occurs on my one project. Which makes things even stranger.
I have also found out that the problem so far seems to be fixed if I use the IP from xampp instead of using a custom domain I added in windows hosts
this picture shows the error on the one with domain and no error without domain.
also here is my vhost config
<VirtualHost 127.0.0.3:80>
DocumentRoot "C:/Users/davye/Documents/GitHub/SchoolProject-1/public"
DirectoryIndex index.php
ServerName laravel-gkb.test
<Directory "C:/Users/davye/Documents/GitHub/SchoolProject-1/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>

Cannot navigate to CodeIgniter site

I have a Ubuntu server with 2 websites on it. I can navigate to one, but not to the other. Here are the details:
Each website has a user with the same name as the group and as the subfolder. Sites are hosted under
/home/site1/public_html and
/home/site2/public_html
Now in my case site1 is called from a subdomain, but it works just fine, so if I navigate to site1.mydomain.com it opens up the CodeIgniter page and I can navigate with no issues (I have .htaccess here to get rid of index.php in the url).
However when I try to navigate to www.site2.com which points to /home/site2/public_html it gives me a 404 error. So to troubleshoot, I added a /home/site2/public_html/index.html simple file and I can see that if I navigate to www.site2.com, however I can't see it if I navigate to www.site2.com/index.html. Also, in my case, I have a subfolder (with same name as the site = "site2") where CodeIgniter code/folder structure is and I just can't get tot that index.php from code igniter at all (path to it is /home/site2/public_html/site2/index.php). I tried to navigate as www.site2.com/site2/index.php or www.site2.com/index.php with or without htaccess file but with no help. I tried to remove the .htaccess in this site, I tried to create a test.html in /home/site2/public_html/site2 but I can't navigate to it, I get 404 if I do www.site2.com/site2/test.html
in terms of user access I used $ chmod -R 755 /home/site2
Is it an access right that I am missing? Or a conflict with the other .htaccess from the other virtual folder? No clue... and I am just running out of ideas
V Host Settings
ServerName site1.mydomain.com
ServerAlias site1.mydomain.com
DocumentRoot "/home/site1/public_html"
<Directory "/home/site1/public_html">
AllowOverride All
allow from all
Options Indexes FollowSymLinks MultiViews
Require all granted
</Directory>
and for the one I've trouble with
ServerName www.site2.com
ServerAlias www.site2.com
DocumentRoot "/home/site2/public_html"
<Directory "/home/site2/public_html">
AllowOverride All
allow from all
Options Indexes FollowSymLinks MultiViews
Require all granted
</Directory>
NOTE : I just made a subdomain site2.mydomain.com (domain registered with FatCow) and that seems to be working, it does not work only when I call it with www.site2.com (register under GoDaddy - which gives a GoDaddy "Destination unknown" page which I assumed it is a 404 error and always asks me to Accept cookies ... and I am on a diet :P )
Thanks anyone in advance!
oh darn thing, you were right #sintakonte, one site was pointing somewhere else. Go daddy had a A record with old IP address, I added another A record and asked them to park the original (as I had no rights to do so from their website). And problem got resolved. Thank you!

Website show me "It works" page sometimes when access from external network

I have a strange problem. I have a website, running on an Ubuntu 16.04 server, with Apache 2.4.18. In the beginning of the developer, I can only access the site in the Local Network, from my computer. I edit my hosts file to access:
< Local Server Ip > < Website Url >
For example:
192.168.1.30 test.website.com
And I could access the site without problem. But now, the site needs to be visible from outside our LAN, in other words, from internet. So, the guys from Networks add our public IP and the Domain DNS and the subdomain of the site. This is where the problem is.
Sometimes, when I try to access the site from outside, from my cellphone or in my house, the site is displayed correctly, without problem (with some styles problem, but that is other theme). But, sometimes, I think 7 of 10 times, the site is not displayed, and shows me the Apache "It Works!" page instead. Local, I still see the site correctly, but from external, the problem persists.
I tested in the server, checking the access_log of the site. I see that when the site is displayed correctly, in the log is printed the http request:
"GET / HTTP/1.1" 200
But, when it throws at me the "It Works!" page, the log does not show me anything.
So, I have two theories:
1) Sometimes, the requests is sent to other server.
2) Sometimes, the requests reach my server, but with other request different to my site (for example, other url), If it is possible in any way.
Does someone know how can I verify and fix this? Some recommendations or guide for what could be happening?
Thanks.
EDIT 1:
From your comments:
#alanlittle: I don´t have a general access log, how can I enable it? (To be honest, I did not know that I could). About mod_rewrite, well, it is displayed in the Loaded Modules entries of phpinfo(), Is it could be cause of something?
#Ray O'Donnell: Here is my virtualhost example of the cofiguration:
<VirtualHost *:80>
DocumentRoot /var/inetpub/test.website.com
ServerName test.website.com
ServerAdmin eliacim.davila#xxxxxxx.xxx
ErrorLog "${APACHE_LOG_DIR}/test-error.log"
CustomLog "${APACHE_LOG_DIR}/test-access.log" common
</VirtualHost>
<Directory /var/inetpub/test.website.com>
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
# Require all granted
</Directory>
#Jeff Puckett II: We don´t have a load balancer (As Far As I Know). I run the nslookup command, and it show me this:
Server: b.resolvers.Level13.net
Address: 4.2.2.2
Non-authoritative answer:
Name: test.website.com
Address: 189.219.xx.xxx (NOTE: Our Public IP)

Problems with deploying Kohana to a cloud machine - 404

I have uploaded all my project files onto my cloud machine in the drectory /var/www/html/.
When I visit the IP address of this machine through a browser, it shows me the expected page, which routes to MyCtrl/index.
However, if I manually go to IPAddr/MyCtrl/index, I get an apache server 404 error.
None of the other routes work either. eg. IPAddr/MyCtrl/someOtherAction results in a 404 as well.
The fact that the homepage loads means that the default configuration for MyCtrl/index is working, but maybe URL rewriting is not being done right?
Can someone tell me whether the problem is with my bootstrap.php file or with my .htaccess file, along with a possible fix?
It's the first time I'm deplying an application onto a cloud machine, so I'm not really sure what the problem is.
So if anyone has the same issue, here's the fix:
(This is considering that all project files are in /var/www/html/
Changes have to be made in /etc/apache2/apache2.conf
From:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
To:
<Directory /var/www/>
Options All
AllowOverride All
Require all granted
</Directory>
This answer helped me out:
Kohana The requested URL /home was not found on this server

Categories