Nginx + PHP7 + Drupal8 + simplesamlphp 1.14.10: 403 Forbidden Error

540 views
Skip to first unread message

hq

unread,
Dec 12, 2016, 1:05:13 AM12/12/16
to SimpleSAMLphp
Hi all,

I got error but could not be solved. I think it is not strange error, but I tried all the ways and this is the final step to post to group and need your help!

+ Installed Drupal 8 at /home/mydomain.com/www
+ Install simplesamlphp by following manual: https://simplesamlphp.org/docs/stable/simplesamlphp-install
  - Installed dir: /home/mydomain.com/simplesaml
  - ln -s /home/mydomain.com/simplesaml/www /home/mydomain.com/www/simplesaml
  - edit /home/mydomain.com/simplesaml/config/config.php: 'baseurlpath' => 'http://mydomain.com/simplesaml/'
  - add nginx configuration for simplesaml.conf and add include simplesaml.conf at the end of mydomain.com.conf

location ~ ^/simplesaml {
alias /
home/ladressa.com/simplesamlphp/www/;

location
~ ^/simplesaml/(.+\.php.*)$ {
 fastcgi_split_path_info
^(.+\/module\.php)(/.+)$;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name
;
 fastcgi_param PATH_INFO $fastcgi_path_info
;
 fastcgi_index index
.php;
 include fastcgi_params
;
 fastcgi_pass php_fpm
;
}
}

  - I tried to add more test.php file at /home/mydomain.com/simplesaml/www to show phpinfo();
  - fastcgi_params configuration file is original default.

RESULTS:


I had checked the owner and permission of /home/mydomain.com/simplesaml and /home/mydomain.com/www. They are same.

I checked the error.log but there is nothing about 403 forbidden error.

I tried to turn off SELinux (I don't like that) and restart server + nginx, but the same error, and no error log.

Is there any problem with my configuration?

If you have any experience about Drupal and simplesamlphp, please help and share with me.

Thanks so much!
HQ

hq

unread,
Dec 12, 2016, 3:19:53 AM12/12/16
to SimpleSAMLphp
The configuration I copied overthere is my real domain. There is no syntax error.

By the way, I tried http://mydomain.com/simplesaml/module.php only, it show error log with simplesamlphp's UI:

SimpleSAML_Error_NotFound: NOTFOUNDREASON('%URL%' => 'http://mydomain.com/simplesaml/module.php', '%REASON%' => 'No PATH_INFO to module.php')


That means the php script runs normally. But there is 403 forbidden without reason when I tried: http://mydomain.com/simplesaml/module.php/core/frontpage_welcome.php

Best regards,
HQ
Reply all
Reply to author
Forward
0 new messages