Page 1 of 1

Password protect Serendipity's home directory

Posted: Sun Apr 08, 2018 12:48 pm
by alblee
I would like to password restrict my Serendipity installation but the app's home directory already has a default .htaccess file that doesn't seem to allow any tampering [the install breaks when the app is called]. How can I password protect the Serendipity home directory on Linux/Apache? Danke!

Re: Password protect Serendipity's home directory

Posted: Sun Apr 08, 2018 4:37 pm
by thh
alblee wrote:I would like to password restrict my Serendipity installation but the app's home directory already has a default .htaccess file that doesn't seem to allow any tampering [the install breaks when the app is called].
You can generally modify the default .htaccess file without breaking Serendipity.

Did you try add your basic auth to the .htaccess file outside the

Code: Select all

# BEGIN s9y
[...]
# END s9y
markers? - That shouldn't break anything.

Does your basic auth work at all (without Serendipity)? Error messages after adding basic auth may be due to a wrong location of the password filde or basic auth being disabled by your hoster.

Re: Password protect Serendipity's home directory

Posted: Mon Apr 09, 2018 2:11 am
by alblee
Thanks @thh. I will try inserting
your suggested lines again,

Re: Password protect Serendipity's home directory

Posted: Mon Apr 09, 2018 10:36 am
by alblee
@thh, Hi!

I tried adding the following lines outside of the
# BEGIN s9y
[ ... blah ... ]
# END s9y



BEGIN MY INSERTION
AuthType Basic
AuthName “Sinuswerte Ka? Hwag Road Please”
AuthUserFile somepath/somepath/.htpasswd
require valid-user
END MY INSERTION


and that broke the Serendipity-default .htaccess file in its home directory.
But when I removed the offending four lines. The forum came back in fine shape.
I still want to password protect that Serendipity home directory from public eyes for now. It:s just that the revised .htaccess file doesn't work, heh heh.

Or would you have a suggestion how to make the Serendipity front door publicly invisible except to the few of us who have password keys to open the private blog? This effectively makes our Serendipity a private team space, for now, until we decide it is time to go public?

Thanks very much again. :)

Re: Password protect Serendipity's home directory

Posted: Mon Apr 09, 2018 9:39 pm
by thh
alblee wrote:BEGIN MY INSERTION
AuthType Basic
AuthName “Sinuswerte Ka? Hwag Road Please”
AuthUserFile somepath/somepath/.htpasswd
require valid-user
END MY INSERTION

and that broke the Serendipity-default .htaccess file in its home directory.
But when I removed the offending four lines. The forum came back in fine shape.
Does that work somewhere else, i.e. can you test that in another directory or vhost?

It may be that the path to your .htpasswd is wrong or your provider does not allow basic auth in .htaccess files.

Your code should work with Serendipity.

Re: Password protect Serendipity's home directory

Posted: Tue Apr 10, 2018 2:51 am
by alblee
Yes, @thh, I had thought so.
I will try submitting a service ticket to the hosting admin.

Thanks.
thh wrote:
alblee wrote:BEGIN MY INSERTION
AuthType Basic
AuthName “Sinuswerte Ka? Hwag Road Please”
AuthUserFile somepath/somepath/.htpasswd
require valid-user
END MY INSERTION

and that broke the Serendipity-default .htaccess file in its home directory.
But when I removed the offending four lines. The forum came back in fine shape.
Does that work somewhere else, i.e. can you test that in another directory or vhost?

It may be that the path to your .htpasswd is wrong or your provider does not allow basic auth in .htaccess files.

Your code should work with Serendipity.