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.
Related
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.
I created a virtual host on apache localhost, when I try to access it on the browser it's saying "Your connection is not pricate".
Here's the virtual host from httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost 127.0.0.1:80>
DocumentRoot "C:/xampp/htdocs/newkolabo/public"
ServerName kolabo.dev
</VirtualHost>
#1 Wrong Date & Time
Your computer or device's date & time have changed to be an incorrect value. It could be sooner or later but will make your browser can't verify the SSL certificate. That said, your browser will display this error to notify you. To resolve, you need to check your date & time again and make sure they are correct.
#2 Antivirus Blocked SSL Connection
Besides the wrong date & time configuration, your antivirus software can block all SSL connections as well, especially if it has the SSL scanning feature, as seen on here. In this case, you can turn off your antivirus software temporarily to verify it's the cause or not. Also, you can locate the SSL scanning feature and turn it off.
#3 Invalid Google Chrome's Cookies & Cached Files
According to reports from users, many of them have cleared all cookies, and cached files in Google Chrome and this irritating error was gone. So, it could be caused by invalid cookies or cached files. To fix it, simply clean up all those details. Besides, resetting your Google Chrome would be helpful, but make sure you have backed up bookmarks and saved passwords. Otherwise, all those details will be deleted. You can also use Google Sync to back up those critical details.
#4 Expired SSL Certificates
Turning a website into HTTPS is to make it more secure and protect users' information. Benefits of HTTPS are real, but you also need to purchase SSL certificate to make your website work in the HTTPS version. In some cases, if the owner of the website forgot to renew the SSL certificate, you will get this error when visiting it. In this case, there is nothing you can do to get rid of it, except notify to website owner, as well as bypass it by clicking on the "Proceed" link.
#5 Invalid SSL Certificate Setup
If the website owner set up SSL certificate in wrong way, there is no way to access the HTTPS version correctly. Subsequently, you always get this error every time you access that website.
Alongside those solutions above, you can also turn off your firewall to get rid of this error (if it was caused this error). Just need to turn it off temporarily to test and then turn it on.
To turn this error message off in Google Chrome for temporary, you can add the --ignore-certificate-errors tag in the shortcut. Source
Do not forget to edit your hosts file. Also there are some problems with your virtual config file.
Try this.
In your hosts file
127.0.0.1 localhost kolabo.dev
::1 localhost kolabo.dev
In virtual config
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/public"
ServerAdmin admin#localhost
ServerName kolabo.dev
ServerAlias kolabo.dev
<Directory "C:/xampp/htdocs/public">
Allow from all
Require all granted
</Directory>
I am very new in PHP and moreover in Laravel (I came from Java) and I am going totaly crazy trying to correctly deploy a Laravel 5.4 projects that works fine in my XAMPP local environment on my Linux server. The problem should be related to virtual host configuration but I can't find a solution also asking question and reading documentation.
In my local environment (I am using XAMPP on Windows) I have setted this virtual host into the C:\xampp\apache\conf\extra\httpd-vhosts.conf file:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/HotelRegistration/public"
ServerName laravel.dev
</VirtualHost>
So opening the laravel.dev URL I obtain the standard Laravel homepage (I have yet not replaced it with a landing page).
Then if I open this URL: http://laravel.dev/registration
I obtain the user registration page developed by me, this because I have this route into my web.php file into my project:
Route::resource('/registration', 'RegistrationController');
Then into my RegistrationController.php there is this method showing the resources/views/registration/index.blade.php view
public function index(){
return view('/registration/index');
}
In local environment, with the laravel.dev vhost pointing to the document root of my Laravel website, it works fine.
Now I have uploaded this Laravel website into my remote Linux server, into this folder: /var/www/html/HotelRegistration
But now my problem is that in this remote environment I had not virtual host (correct me if I am doing wrong assertion: from what I have understand the virtual host is used on the local environment to simulate a domain that Laravel need to point to the public folder, is it this reasoning correct?)
Anyway, this is the URL of the public folder of my deployed web site on my remote server:
http://89.36.211.48/HotelRegistration/public/
As you can see opening it the Laravel landing page is correctly shown, the problem is that I can access to the previous registration page, the only way that I have found is to open this URL:
http://89.36.211.48/HotelRegistration/public/index.php/registration
but it is pretty horrible and above all when the registration form is submitted it is generated a POST request toward this URL http://89.36.211.48/registration that end into a 404 Not Found error.
In the past I explained the situation here: What is wrong in the deploy of this Laravel application? Need I an effective domain instead the vhost used on my local environment?
but now I have do some changes to my Apache configuration followint the suggestion given in the previous post (adapting the answer to my folder structure).
So into this Apache folder /etc/apache2/sites-available I created and enabled the laravel.dev.conf related to my new vhost, having this configuration:
<VirtualHost *:80>
ServerAdmin mymain#gmail.com
ServerName 89.36.211.48
ServerAlias www.laravel.dev
DocumentRoot /var/www/html/HotelRegistration/public/
ErrorLog /var/www/html/HotelRegistration/storage/logs/error.log
CustomLog /var/www/html/HotelRegistration/storage/logs/access.log combined
<Directory /var/www/html/HotelRegistration/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
The path are related to where this website is installed on my remote server I am absolutly not sure if these configuration are ok, expecially about the ServerName value (I put here the IP of my server, is it correct?)
Then I enabled this virtual host using this statment:
sudo a2ensite laravel.dev.conf
and I restart apache.
Ok, the problem now is: what have I to do to correctly access to this website?
I still have the same problem, that is:
I still access to the Laravel landing page by this URL: http://89.36.211.48/HotelRegistration/public/
I still access to the registration form page by the horrible URL: http://89.36.211.48/HotelRegistration/public/index.php/registration
Submitting the form I still go to http://89.36.211.48/registration and obtain the same 404 Not Found error page.
So my doubts are:
Is it the virtual host correctly configured?
If it is correct what have I to do to correctly access to this web site? Need I a domain (if yes: what have to point this domain?) or can I use a path into my server in some way (something like: http://89.36.211.48/HotelRegistration/)
I am expanding my comment here.
Set folder structure like on image:
In index.php change paths like this:
line 22
require __DIR__.'/system/bootstrap/autoload.php';
line 36
$app = require_once __DIR__.'/system/bootstrap/app.php';
Thats all what I do when transferring Laravel app to server (and changing .env for database). Sometimes I have to change permissions for storage folders but thats it.
Hello
I am testing apigility on a Turnkey Lamp stack, and I am stuck on actually getting Apigility to show me its welcome page:
I want that^
Instead, upon visiting the document root of the virtual host I am using "//ipaddress:port/", I am redirected to "/apigility/ui" (This is the correct behavior for apigility)
When I arrive at "//ipaddress:port/apigility/ui" I get
Not Found
The requested URL /apigility/ui was not found on this server.
I am now stuck on how to move forward.
I have:
Made sure that the directory permissions are set correctly
Set up my virtual host (text at the bottom)
Made sure that my apigility dir is at the correct location
Made sure apigility is in development mode
Taken my googlefu to its limit
EDIT: I have also successfully opened a phpinfo.php page that I moved into the public folder of the apigility project
EDIT: If I turn off development mode, I do get the page that says how to turn on development mode. Possibly an issue with dev mode?
Edit: I attempted Rahman's fix, but it did not assist with apigility not correctly serving the apigility/ui page. Although it does seem like a cleaner way to use Apache.
Any help would be much appreciated.
To me it seems like there is some issue with the apigility setup, as it starts to redirect me to the correct location, but cannot find the /apigility/ui page it redirects me to.
Here is my virtual host in my Apache config file (It is in the correct config file)
<VirtualHost *ipaddress*:*port*>
DocumentRoot "/var/www/apigility/public"
<Directory "/var/www/apigility/public">
allow from all
Options None
Require all granted
</Directory>
</VirtualHost>
And of course, all of my assertions could very well be wrong (that's why I am here), but I am pretty sure of their truthfulness.
UPDATE:
While Rahman's answer is useful, it does not answer my question. I believe the not found error is related to apigility failing, not Apache incorrectly routing. I will not be accepting that answer, as the problem is not solved. (But would be open to discussion on that answer)
UPDATE: With Rahman's VirtualHost in the apache config file, I only had to enable mod_rewrite, and I can now access the Welcome to Apigility page!
Details on mod_rewrite I found here:
.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Not Found error is because your web server neither can find the location on the server nor can find any rewrite rule for requested url.
So considering that Apiagility has a .htaccess file in the public directory, your problem is in the Apache configuration.
I suggest you edit your Apache configuration file like this:
<VirtualHost *ipaddress*:*port*>
DocumentRoot "/var/www/apigility/public"
<Directory "/var/www/apigility/public">
AllowOverride All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
I have created a server using the Apache httpd, mysql and PHP. I have installed phpmyadmin. but if I try to access through my browser I am getting a blank page instead of login. what I can do for this?
I can't comment as my reputation isn't high enough on here.
However, if you post the steps you've already implemented I'm sure somebody can help. As it is you've given no helpful information.
A few things to check:
Have you checked your apache error logs?
/var/log/httpd/error_log
Have you created a 'Directory' directive to allow permission?
<Directory "/usr/share/phpmyadmin">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
Have you added an alias in your httpd.conf or virtual host configuration to enable access?
Alias /phpmyadmin /usr/share/phpmyadmin
You can enable php logging using the instruction mentioned here:- enter link description here
By checking the php log you can make sure whether it's been caused by high memory requirement.
Also make sure the permissions & ownerships of the phpmyadmin files are correct.