Mobile app version of vmapp.org
Login or Join
Miguel251

: SIMPLEST way to set up password protection for a static site, with basic admin UI? I have a static site. I would like the simplest approach to password protecting a directory, with a basic

@Miguel251

Posted in: #Authentication #Htaccess #Password #Security

I have a static site.

I would like the simplest approach to password protecting a directory, with a basic admin UI for adding/removing users. I will have so few users that I don't care about performance.

I don't care if it's PHP or Django or whatever, I just want a complete software package.


Apache basic auth isn't good, because you can't log out. Nor is there a UI for adding users.
I tried throwing everything behind Django auth and serving the files through Django. However, Chrome treats all my text/css headers as text/plain, so I don't get any stylesheets showing.
I can't use mod_xsendfile on my server because I can't reconfigure Apache to add new modules. I think this approach is overkill anyway.
I can try configuring Nginx's X-Accel-Redirect, however that requires implementing all the Django code for auth myself, and I'd prefer an existing solution. However, this is my backup plan.


Is there a code package that implements authentication with basic admin for a static site?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel251

1 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

Anything you do to handle authentication even if it is a static site will still become somewhat dynamic simply from the need to have a database backend for authentication, which in turn means more than likely the trade-off of using the database to power the page content as well. What would best suit your needs here is a content management system. There are a large number of them out there and the vast majority of them have user authentication built in. This has the advantage of providing a logout experience for the end user as well as being a pre-canned solution that has been tested and undergoes maintenance.

Some of the PHP-based solutions that I can think of would be...


Joomla - Authentication Documentation
WordPress - Authentication Documentation
Plone - Authentication Documentation

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme