skip to Main Content

I have a web app that is served with Lighttpd. I implemented digest authentication to the application using its Lighttpd’s mod_auth module: https://redmine.lighttpd.net/projects/lighttpd/wiki/Mod_auth

Currently it displays a blank white page when user is prompted for username and password. I’d like to be able to customize this page and redirect to the web app once user has logged in successfully. Is this possible?

2

Answers


  1. Currently it displays a blank white page when user is prompted for username and password.

    "it" is the client, often a browser, which handles the 401 Unauthorized response from the server.

    If you want to manage the authorization yourself instead of letting the browser do it, then you can write a FastCGI Authorizer and can implement HTTP Digest Auth yourself. Detect if the client is authorized, if not serve a web page of your choice (or redirect) which prompts for username and password, along with some token for the target page once the user fills out the form and is authorized. See lighttpd mod_fastcgi

    Login or Signup to reply.
  2. For authentication create a html page and specify its location in Lighttpd’s configuration. After authentication use mod_redirect, by which you can setup redirect to your web app.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search