k0a1a / hotglue2

HOTGLUE is a Content Manipulation System which allows to construct websites directly in a web-browser.
http://hotglue.me/demo
GNU General Public License v3.0
275 stars 38 forks source link

Password protecting viewing of pages (not just editing access) #31

Open rafic20 opened 3 months ago

rafic20 commented 3 months ago

Hi,

Using user-config-inc.php, I can set the login username and password for accessing editing mode in Hotglue (i.e. pages with the url structure /hotglue/my_page_name/?edit.

I would like to password protect the viewing of Hotglue pages as well. So if your browser requests /hotglue/my_page_name/, I'd want to display a login dialog. I was not able to get this to work using an .htpasswd file that is referenced in .htaccess, with both files located in the Hotglue folder.

The Apache logs give me a "wrong password" error. I'm wondering if the .htpasswd info is conflicting with the login credentials set in user-config-inc.php.

.htaccess

AuthUserFile /app/data/public/hotglue/.htpasswd
AuthName "Authorization Form Title"
AuthType Basic
require valid-user

.htpasswd (generated with OpenSSL, sample below)

user:<my_password>