Password Protected Blog

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
JamesK
Posts: 3
Joined: Mon Jun 28, 2004 4:52 pm

Password Protected Blog

Post by JamesK »

I would like to consider using Serendipity to run a private web journal, that is, no access to the posts without login. I have made a couple of attempts to protect the first page with a password, but because Serendipity uses htaccess all I did was mess things up. I can use a password protected index filter, but i wondered if there is something easy that I can change in the Serendipity php files to do this
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Password Protected Blog

Post by garvinhicking »

Basically your first try was right. Just edit your .htaccess file

Just add those lines at the *TOP* of the file:

Code: Select all

AuthType Basic
AuthName "Authorisation: Blog"
AuthUserFile /etc/.htpasswd
ErrorDocument 403 /serendipity_access.htm
require valid-user
Of course you need to adjust your paths...
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CapriSkye
Regular
Posts: 119
Joined: Sun Oct 31, 2004 4:42 am
Location: Taiwan
Contact:

Post by CapriSkye »

is it possible to just protect certain category? maybe entries to the protected category won't show up in main index, and when people click on that category it will prompt for password? thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

In 0.8 it is possible to only allow editors/authors to access entries, via the 'entryproperties' plugin (normal users will not see them at all). So it's on a "per entry" basis, not "per category". It could be made to be per category, but since I do not support the concept of protected blog content, I will not code that by myself...

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply