simplesamlphp

Getting a 403 forbidden error for simplesaml after Apache upgrade


My simplesaml was working perfectly until I upgraded Apache to 2.4.6 on Ubuntu

The error I was getting :

Forbidden

You don't have permission to access /simplesaml/ on this server.

Solution

  • The instructions for installing simplesamlphp on Apache only require an alias for the simplesamlphp directory :

    https://simplesamlphp.org/docs/stable/simplesamlphp-install#section_6

    But for Apache 2.4.6+ the security has changed - it worked for me when I added a Directory directive. eg:

    <VirtualHost *:80>
        ServerName mywebsite.dev
        DocumentRoot /home/myuser/www/mywebsite/
    
        <Directory /home/myuser/www/mywebsite/>
            Require all granted
        </Directory>
    
        Alias /simplesaml /var/simplesamlphp/www
    
        <Directory /var/simplesamlphp/www/>
            Require all granted
        </Directory>
    
    </VirtualHost>