StudentAffairsUWM / Laravel-Shibboleth-Service-Provider

Shibboleth Authentication for Laravel
https://packagist.org/packages/saitswebuwm/shibboleth
30 stars 38 forks source link

Help with apache conf settings #4

Closed pyrello closed 10 years ago

pyrello commented 10 years ago

Hello,

Can you provide an example of the apache conf that you are using besides what is contained in the .htaccess file? I am having trouble getting this to work and I suspect that it is because of a problem with either my vhost conf files or the shib.conf file that is generated during installation.

Thanks!

michaeljs1990 commented 10 years ago

Here is my shib.conf file... I was just informed though as i didn't set the shib.conf file up that this is widely different between ditros so you may have to do some digging to look out how it works for your OS.

LoadModule mod_shib /usr/lib64/shibboleth/mod_shib_22.so

<Location /Shibboleth.sso>
  Satisfy Any
  Allow from all
</Location>

<IfModule mod_alias.c>
  <Location /shibboleth-sp>
    Satisfy Any
    Allow from all
  </Location>
  Alias /shibboleth-sp/main.css /usr/share/shibboleth/main.css
</IfModule>

<Location /secure>
  AuthType shibboleth
  ShibCompatWith24 On
  ShibRequestSetting requireSession 1
  require shib-session
</Location>

here is the vhost file

http file

<VirtualHost *:80>
        ServerName example.server.com
        ServerSignature Off

        RewriteEngine On
        RewriteCond %{HTTPS} !=on
        RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

https file

<VirtualHost *:443>

        ## SSL Configuration
        SSLEngine On
        SSLCipherSuite SSLv3:TLSv1:+HIGH:!SSLv2:!MD5:!MEDIUM:!LOW:!EXP:!ADH:!eNULL:!aNULL

        SSLCertificateFile /var/www/ssl-crt/xxx.crt
        SSLCertificateChainFile /var/www/ssl-crt/incommon_intermediate.crt
        SSLCertificateKeyFile /var/www/ssl-crt/xxx.key

        ## Server Configuration
        ServerName example.server.com
        ServerSignature Off
        DocumentRoot /var/www/html

        <Directory /var/www/html>
                Options -Indexes +FollowSymLinks +MultiViews
                AllowOverride All
        </Directory>

</VirtualHost>

I believe the shib.conf file is the default one and this is running on a RHEL 6 server not that it should matter between linux distros.

pyrello commented 10 years ago

So, you have your https server configuration pointing to /var/www/html as the root of your site? In mine, I have to set it to /var/www/html/public, otherwise I get 404's for everything.

pyrello commented 10 years ago

I appear to be having a conflict between the locations specified in shib.conf and the URL re-writing in Laravel. When I set the the DocumentRoot and Directory to /var/www/html, I am able to access the Shibboleth paths of /secure and /Shibboleth.sso/Login, but none of the routes work. When I set the DocumentRoot and Directory to /var/www/html/public, then the application routes work, but none of the Shibboleth defined URLs do.

michaeljs1990 commented 10 years ago

I still navigate to the public laravel folder. The server config I showed you is housing many different applications so I wouldn't look into that at all. I would start with keeping the root at /var/www/html and then navigate to your laravel configurations using www.example.com/public that should get shibboleth and laravel working.

michaeljs1990 commented 10 years ago

No response in a while so I am closing this ticket.