Project

General

Profile

Actions

Feature #1014

closed

Configure lighttpd for use with piboxwww

Added by Hammel over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Web Server
Target version:
Start date:
31 Jul 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

This is to test the suitability of switching to lighttpd (as opposed to Busybox httpd) from Monkey.


Files

lighttpd.conf (12.2 KB) lighttpd.conf Modified default configuration file Hammel, 24 Sep 2023 17:10
modules.conf (3.63 KB) modules.conf Modified modules.conf Hammel, 24 Sep 2023 17:11
debug.conf (1.01 KB) debug.conf Modified debug.conf Hammel, 24 Sep 2023 17:11

Related issues

Related to piboxwww - Bug #1040: Investigate alternatives to Monkey as a web serverClosedHammel23 Sep 2023

Actions
Actions #2

Updated by Hammel about 1 year ago

  • Related to Bug #1040: Investigate alternatives to Monkey as a web server added
Actions #3

Updated by Hammel about 1 year ago

This is turning out to be the likely path, as I found all the information I need to get it to load the piboxwww site on a browser.

Some notes

I've attached my conf file updates when testing on cam1.

Actions #4

Updated by Hammel about 1 year ago

Actions #5

Updated by Hammel about 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20

Configure htdigest authentication and make sure piboxwww is updated, if needed to point to the correct htdigest file.

I will want to remove "monkey" from the config/directories/etc. and change it to "pibox".

Actions #6

Updated by Hammel about 1 year ago

  • Severity changed from 05 - Very Low to 01 - Critical
Actions #7

Updated by Hammel about 1 year ago

Configuring htdigest

  • Generate pw file: htdigest -c /etc/lighttpd/.passwd 'Authorized users only' tom
    • htdigest is in apache so we don't have that.
    • Generate with openssl (requires adding binary to Buildroot-Target Packages-Libraries-openssl)
      $ echo "password" | openssl passwd -apr1 -stdin
      $apr1$r8mlIRyv$B7xsBRVCUyMnCjfvkR/u./
      
      $ echo  "username:$(echo password | openssl passwd --salt r8mlIRyv -apr1 -stdin)" 
      username:$apr1$r8mlIRyv$B7xsBRVCUyMnCjfvkR/u./
      
      $ echo  "stats:$(echo stats | openssl passwd -apr1 -stdin)" 
      stats:$apr1$iLpPMCo9$j1zviL0K9tL6N7UtBvwcT.
      
    • Generate with md5sum and awk
      printf "%s:%s:%s\n" "$user" "$realm" "$(printf "%s" "$user:$realm:$pass" | md5sum | awk '{print $1}')" 
      
  • Enable module: server.modules += ( "mod_auth" )
  • Add to lighttpd.conf
    auth.backend = "htdigest" 
    auth.backend.htdigest.userfile = "/etc/lighttpd/.passwd" 
    auth.debug = 2
    
  • pw protect directories
    auth.require = ( "/docs/" =>
    (
    "method" => "digest",
    "realm" => "Authorized users only",
    "require" => "valid-user" 
    )
    )
    
Actions #8

Updated by Hammel about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 20 to 100

All changes tested on hardware and working.

Code committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF