View Single Post
Old 05-12-2014, 07:51 AM   #901
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 726
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
I have recently updated my Synology (DS110j) to DSM 5.0-4482.

I read somewhere that user authentication should now work out of the box. I decided to give it a try. And success!!! It works.

There is no longer any need for:
Code:
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule auth_digest_module modules/mod_auth_digest.so
.htaccess with:
Code:
<FilesMatch "\.php$">
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
AuthName "User & password:"
AuthType Basic
Require valid-user
</FilesMatch>
worx!

[I did not test this on the synology package, I installed COPS from source.]

PS: I had some trouble editing the .htaccess file with vi. The last line of the file (</FilesMatch>) was not visible. I forgot to delete #. This caused a lot of and and once I figured this out.
mariosipad is offline   Reply With Quote