2022-07-12-thttpd-install-on-32-or-64-bit-OS.txt








frank@raspberrypi:~ $ cat /proc/cpuinfo 
processor	: 0
BogoMIPS	: 108.00
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 1
BogoMIPS	: 108.00
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 2
BogoMIPS	: 108.00
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

processor	: 3
BogoMIPS	: 108.00
Features	: fp asimd evtstrm crc32 cpuid
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd08
CPU revision	: 3

Hardware	: BCM2835
Revision	: c03130
Serial		: 1000000019c3b021
Model		: Raspberry Pi 400 Rev 1.0
frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ cat /proc/meminfo 
MemTotal:        3885552 kB
MemFree:         1301448 kB
MemAvailable:    3132348 kB
Buffers:           42008 kB
Cached:          1871760 kB
SwapCached:            0 kB
Active:           226468 kB
Inactive:        2065848 kB
Active(anon):       1728 kB
Inactive(anon):   477736 kB
Active(file):     224740 kB
Inactive(file):  1588112 kB
Unevictable:       82000 kB
Mlocked:              16 kB
SwapTotal:        102396 kB
SwapFree:         102140 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:        460580 kB
Mapped:           296364 kB
Shmem:            100916 kB
KReclaimable:      95268 kB
Slab:             127072 kB
SReclaimable:      95268 kB
SUnreclaim:        31804 kB
KernelStack:        6048 kB
PageTables:         8952 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2045172 kB
Committed_AS:    2122660 kB
VmallocTotal:   259653632 kB
VmallocUsed:       12860 kB
VmallocChunk:          0 kB
Percpu:              736 kB
CmaTotal:         327680 kB
CmaFree:          146284 kB
frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ cat /proc/version 
Linux version 5.15.32-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022
frank@raspberrypi:~ $ 




07-07-thttpd-install-32-bit-or-64-bit.txt

cd ~/freedom   ### (The directory "freedom" should be in "/home/(pi)/" (the main user's home directory)).


	It would probably be a good idea to read through this install before one sits down and starts building their web site, just to get an idea of what one will be copying and what the computer will be sending back. "thttpd" will start when the computer loads and if something causes it to stop, it will restart in 10 seconds. "thttpd" is designed to be a 24/7/365 World Wide Web server. When the OS needs to "reboot", thttpd will be running by the time the desktop appears. It is totally AWSOME!!!

	Since the Raspberry Pi has wireless capabilities, using a wireless router (even one not connected to the internet), in a classroom situation, more than 200 students can be connected to the same "C" class network (192.168.xxx.0/24) and can each connect to each other's web servers, where xxx is the same for all, and the 0 position can very from 2 - 254, with 0 representing the network, 255 is reserved for the broadcast address, and 1 reserved for the router address. With the router set up as a “DHCP Server” all of the computers would receive dynamic IP addresses and all of their http websites would be available in the addresses they were assigned. The http port number (80) is assigned by thttpd and the IP addresses are assigned from the router.

	I have tried to make this install simple enough even a third of fourth grader should be able to get through it. Since I have had trouble missing some commands I will mark them, as a comment, with "###" and "### sudo", for commands that need to be executed as "sudo". This way a person should be able to find all of the command lines with just "###". There will be times one has to make their own changes to a command so be careful. It is almost all "copy and paste" but there are a few times one will have to use their own words, like file names and passwords for their site. This file is long but I did not strip any of the computer generated lines out of it and added blank lines so one will be able to better see the next item that needs to be copied, pasted, and entered on the terminal.

	The thttpd man page gives a good idea what this program can do. As well, the Acme.com web site has more information. I have also included the: "'ACME Labs HTML Sampler -- HTML is really pretty easy to learn.' If you've ever used any sort of text formatting language, such as nroff or Scribe, this is the same idea. Even if you haven't, you should be able to pick this up pretty quick; it's just text with <special codes> interspersed to specify the formatting.
	"This page gives examples of all the basic HTML formatting codes. Read through it as a tutorial; refer back to it as a reference; use the index at the end."

	To start with one can even use just regular files and thttpd will actually serve them. My site: http://162.250.19.7/ is built mostly that way. But there are some of my old sites that are under "ac0xl/" and then "www/" which I built around 2004 or so. One just has to click on the directory and it will open. To get back up one level just click on the (../) two periods and a slash.

	On a 32-bit OS "thttpd" is limited to displaying files less than 2 GB (2**31 = 2,147,483,647 or 7fff ffff) Bytes. While a 64-bit OS is limited to displaying (2**63 = 9.223372031^18 or 7fff ffff ffff ffff) Bytes. I have tried a 5 GB (5,368,709,120 Bytes) file with no problems! This is with no changes being made in "thttpd". Out of the box, thttpd is bullet proof since it's web site is read-only but capable of doing CGI, as well as several other things, and is safe to run on the "World Wide Web"! My web site: http://162.250.19.7/, has been up and running on the WWW since August 01, 2019 without any problems with hackers doing any damage to my site! The config file is simple and short! The thttpd binary file I created using Raspberry Pi 64-bit OS on a Raspberry Pi 400, Mar 16 21:27, is only 121,272 bytes long and I basically have been using this config file since the beginning:

-r-xr-xr-x 1 bin  bin  121272 Mar 16 21:27 thttpd

pi@raspberrypi:/home/local/www $ 
pi@raspberrypi:/home/local/www $ cat thttpd_config
# /home/local/www/thttpd_config

dir=/home/local/www
chroot		#chroot jail

data_dir=users

#vhost    # if you use a domain name you will have to uncomment (remove the # at the beginning) and then make a "user" directory using your external IPv4 address (xxx.xxx.xxx.xxx) and inside this directory make symbolic links back up to your other files in "users" (ln -rs ../"user-name"), see: "vhost-DN-test".

cgipat=**.cgi
logfile=/home/local/www/logs/thttpd_log
pidfile=/var/run/thttpd.pid
#
pi@raspberrypi:/home/local/www $ 
pi@raspberrypi:/home/local/www $ 


	The thttpd binary file I created using Raspberry Pi 32-bit OS on a Raspberry Pi B version 2.0, with only 512 Megabytes of RAM, Jun  1 21:26, is only 91,232 bytes long:

-r-xr-xr-x 1 bin  bin  91232 Jun  1 21:26 thttpd.



	When I looked at Apache, which out of the box is only safe as an internal web server, I could not make it through the config file and found "thttpd - tiny/turbo/throttling web server." from Acme.com which used to be the number seven (7) most popular web server. 

	I recommend "Geany - A fast and lightweight IDE using GTK+" since that is what came up when I was doing an install on a Raspberry Pi 32 bit OS. It has a split screen. The text install file was on top and should be made read-only with the lower screen as a terminal window. I just slid the separator line up so I would have more room on the terminal. Then it was just: copy the command, and paste it on the terminal and hit enter. What an awesome tool! It takes several hours to go through the install file because there is much text, for a better understanding of thttpd and how it works. The only time I had to start a new terminal is during the "test." When one does the first test, the terminal will lock up because thttpd is still running in it. At this point, on the "Geany" terminal, one will have to enter: "ps -e" to print out all of the PID numbers and then find the numbers that go to thttpd so one can do: "sudo kill xxxx xxxx". The first run will be "sudo" and "thttpd" that one will need to kill. The second time will be "thttpd_wrapper" and "thttpd" that one needs to kill, since we are doing a progressive test to see that everything is working. After "thttpd" is killed, (usually 2 numbers), the terminal will come back. I usually enter the "sudo kill" command twice to show that the PID's are actually gone.

	I have since found "ps p xxxx xxxx" with the "xxxx" being the PID numbers, and will print out what the PID number goes to so one does not wipe out something one should not! Be Safe!!!


*****************************


	Adding "whois" will let you lookup IP Addresses of visitors to your "World Wide Website"!


frank@raspberrypi:~ $ date     ### 159
Thu 07 Jul 2022 03:42:34 PM MDT


frank@raspberrypi:~ $ sudo apt install whois     ### 163
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  whois
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 79.3 kB of archives.
After this operation, 369 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 whois arm64 5.5.10 [79.3 kB]
Fetched 79.3 kB in 1s (148 kB/s)
Selecting previously unselected package whois.
(Reading database ... 92424 files and directories currently installed.)
Preparing to unpack .../whois_5.5.10_arm64.deb ...
Unpacking whois (5.5.10) ...
Setting up whois (5.5.10) ...
Processing triggers for man-db (2.9.4-2) ...
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ whois 162.250.19.7     ### 187

#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/resources/registry/whois/tou/
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/registry/whois/inaccuracy_reporting/
#
# Copyright 1997-2022, American Registry for Internet Numbers, Ltd.
#


NetRange:       162.250.16.0 - 162.250.23.255
CIDR:           162.250.16.0/21
NetName:        RCW
NetHandle:      NET-162-250-16-0-1
Parent:         NET162 (NET-162-0-0-0-0)
NetType:        Direct Allocation
OriginAS:       AS39938
Organization:   River Canyon Wireless (RE-27)
RegDate:        2013-12-12
Updated:        2013-12-12
Ref:            https://rdap.arin.net/registry/ip/162.250.16.0


OrgName:        River Canyon Wireless
OrgId:          RE-27
Address:        611 S. Main
City:           Moab
StateProv:      UT
PostalCode:     84532
Country:        US
RegDate:        2012-02-06
Updated:        2019-06-26
Ref:            https://rdap.arin.net/registry/entity/RE-27


OrgNOCHandle: HICKM57-ARIN
OrgNOCName:   Hickman, Ryan 
OrgNOCPhone:  +1-435-259-8319 
OrgNOCEmail:  Ryan@Royceselectronics.com
OrgNOCRef:    https://rdap.arin.net/registry/entity/HICKM57-ARIN

OrgTechHandle: HICKM57-ARIN
OrgTechName:   Hickman, Ryan 
OrgTechPhone:  +1-435-259-8319 
OrgTechEmail:  Ryan@Royceselectronics.com
OrgTechRef:    https://rdap.arin.net/registry/entity/HICKM57-ARIN

OrgAbuseHandle: COLCO8-ARIN
OrgAbuseName:   Colcord, Bill 
OrgAbusePhone:  +1-435-259-6763 
OrgAbuseEmail:  bill.c@rivercanyonwireless.com
OrgAbuseRef:    https://rdap.arin.net/registry/entity/COLCO8-ARIN


#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/resources/registry/whois/tou/
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/registry/whois/inaccuracy_reporting/
#
# Copyright 1997-2022, American Registry for Internet Numbers, Ltd.
#


pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 

	The Raspberry Pi OS has all of the programs needed to compile "thttpd" already installed since their mission is computer programming. However Ubuntu is designed for normal computer use and does not have the files already installed to compile computer programs. 



Programs that need to be added to Ubuntu for "thttpd" to compile:


	Geany - A fast and lightweight IDE using GTK+ - Developer Tools → IDEs - ubuntu-hirsute-universe, download size: 1 MB. (" sudo apt install geany "   # two 1 MB files, icon looks like a little round tea pot.)



frank@frank-desktop:~$ sudo apt install gcc make make-doc autoconf automake libtool flex bison gcc-doc gcc-10-doc gcc-10-locales glibc-doc whois     ### 269

frank@frank-desktop:~$ 


	"freedom.zip" should be installed in the users "home" directory, and unzipped there to give the directory "freedom". It will probably be a good idea to change: "Firefox, Settings, General, Files and Applications, Downloads" to: "Always ask you where to save files", since we are going to be saving several different files to places besides "Downloads". In Ubuntu, I will be using (frank) to reference my "home directory" which you will have to use your own name without the "()"s.


	Now it is time to change the "$PATH" so the computer can find the "thttpd" program.


*****************************

If you are using Ubuntu, or the path is found in /etc/environment:

	This took me a long time to find but I finally found where to permanently change this in Ubuntu. It is hiding in "/etc" in the file "environment", one could just add: "/home/local/sbin:/home/local/bin:" to the beginning of the line of text. I ran into a lot of new bugs in Ubuntu so have quit using it!


		frank@frank-desktop:~$ 
		frank@frank-desktop:~$ $PATH     ### 288

		bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin: No such file or directory

		frank@frank-desktop:~$ 


frank@raspberrypi:~ $ cat /etc/environment     ### 295

		frank@frank-desktop:~$ 

	If the PATH is in /etc/environment, then use sudo nano to add the following to the beginning of the "path" (inside the quote) /home/local/sbin:/home/local/bin: so the line will begin like: "/home/local/sbin:/home/local/bin:/usr/local/sbin:/usr/local/bin:/...."

		frank@frank-desktop:~$ 
		frank@frank-desktop:~$ sudo nano /etc/environment     ### sudo 302

	Make your changes and then "control o" to write and "control x" to exit.

		frank@frank-desktop:~$ 
		frank@frank-desktop:~$ cat /etc/environment     ### 307
		frank@frank-desktop:~$ 

	Make sure the "path" begins like: "/home/local/sbin:/home/local/bin:/usr/local/sbin:/usr/local/bin:/...."

	The computer has to be restarted for the new "path" to take effect.

	Make sure everything you want to save is saved and then you can:


*****REBOOT*****

		frank@frank-desktop:~$ 
		frank@frank-desktop:~$ sudo reboot     ### sudo 320

*****************************

	When the computer comes back up, go to a terminal and enter:

		frank@frank-desktop:~$ 
		frank@frank-desktop:~$ $PATH     ### 327
		frank@frank-desktop:~$ 

	Make sure the "path" begins with: "/home/local/sbin:/home/local/bin:/usr/local/sbin:/usr/local/bin:/...."

*****************************


	Now back on the Raspberry Pi OS.

pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


frank@raspberrypi:~ $ $PATH     ### 341
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games: No such file or directory


pi@raspberrypi:~ $ # On the Raspberry Pi OS the built in "PATH" is stored in "/etc/profile" on two different lines. One will have to add "/home/local/sbin:/home/local/bin:" to the beginning of the quote. PATH="/usr/local/sbin:/usr/local/bin: ...", to: PATH="/home/local/sbin:/home/local/bin:/usr/local/sbin: ..." for both lines.


frank@raspberrypi:~ $ cd /etc     ### 348
frank@raspberrypi:/etc $ 


frank@raspberrypi:/etc $ cat profile     ### 352
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$(id -u)" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"
fi
export PATH

if [ "${PS1-}" ]; then
  if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "$(id -u)" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
frank@raspberrypi:/etc $ 


frank@raspberrypi:/etc $ sudo nano profile     ### 390
frank@raspberrypi:/etc $ 



frank@raspberrypi:/etc $ cat profile     ### 395
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$(id -u)" -eq 0 ]; then
  PATH="/home/local/sbin:/home/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/home/local/sbin:/home/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"
fi
export PATH

if [ "${PS1-}" ]; then
  if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "$(id -u)" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
frank@raspberrypi:/etc $ 


pi@raspberrypi:~ $ # Make sure the path is right, one will need to reboot to make it active.


frank@raspberrypi:/etc $ reboot     ### 436



frank@raspberrypi:~ $ date     ### 440
Thu 07 Jul 2022 04:10:33 PM MDT


frank@raspberrypi:~ $ $PATH     ### 444
bash: /home/local/sbin:/home/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games: No such file or directory
frank@raspberrypi:~ $ 


frank@raspberrypi:~ $ sudo mkdir -v /fd /hd /sd     ### sudo  is Another thing I do. This makes for handy mount points for: floppy drives (USB), hard drives (1 TB, etc.) and sd cards. When one adds a drive to Ubuntu, the bell rings and nothing shows up because it is not mounted. Doing: sudo fdisk -l     ### this will show the drives and their partitions. Then it is just: sudo mount /dev/sda2 /hd     ### This mounts the second partition of drive "sda". Then one can read the files by: cd /hd/(path or file name) ... ### and then where you want to go. This gives a really short path to that drive, instead of "/media/(user-name)/(drive-name)/(file-name)". I think you get the point!     ### 449
mkdir: created directory '/fd'
mkdir: created directory '/hd'
mkdir: created directory '/sd'
frank@raspberrypi:~ $ 

	 

*****************************



	"thttpd" can actually be installed on almost any "Linux" machine since we compile it for the machine it will be running on. (The actual install is: #1 make clean,  #2 ./configure,  #3 make,  #4 sudo make install.) Since "gcc" is running on the machine, the proper machine code will be generated. ARM processors are not in the program so will complain, but work without any processor optimizations, while most of the older processors should show up OK. These directions should work for almost any processor as long as there is a "gcc" available for that processor. I have included the "thttpd" pages from "Acme.com" for all of the documentation. The last benchmarks were "Web Server Comparisons" Last updated 12jul98. The maximum file size is limited to 2 GB on 32-bit OS's, (2**31 =  2,147,483,647 or 7fff ffff Bytes) so long videos would need to be split into sizes less than 2 GB. On a 64-bit OS (2**63 = 9.223,372,031^18 or 7fff ffff ffff ffff or 9,223,372,031,000,000 Bytes (with the trailing zeros being numbers) is the limit. I have actually tested a 5 GigaByte file (5,368,709,120 Bytes) without any problems! "thttpd" used to be the seventh most popular web server. Out of the box, it is read only, but can run CGI programs, which makes it safe to run on the "World Wide Web"! I moved the install from "/usr/local" to "/home/local" since "/home" is the only directory one can keep when installing a new version OS. That way all of your web site will still be intact! The original files go into directories under "/home", and the actual web pages that are served are under "/home/local/www/users/(the original directory name)" so if something happens to that page the original is still safe. This also makes it possible to make changes and then just copy them to the "public_html" link and the new page is active immediately!


	This is installing thttpd. Most of the commands can be copied from the install file and pasted to a terminal. A few things will need to be changed but most will be: copy, paste, enter. WWW pages for EVERYONE!!!


	To reduce the amount of work needed to install thttpd, I have copied the files from Acme.com and made some modifications. These files have been changed in thttpd-2.29, and these are the changes that were made! *****If you expand "thttpd-2.29.tar.gz" these changes will be missing!*****


*****These files are in: cd ~/freedom/Acme.com/thttpd-2.29/ #*****


	The first change in "thttpd-2.29" is in "Makefile.in" by adding the directory "man1", without this a fresh install will fail! In "Makefile.in" copy line 116 and paste it before, and change man8 to man1, and save the file. The result will be: (This file is: "Makefile.in".)

		114 

		115 install-man:

		116	-mkdir -p $(DESTDIR)$(MANDIR)/man1

		117	-mkdir -p $(DESTDIR)$(MANDIR)/man8

		118	$(INSTALL) -m 444 -o bin -g bin thttpd.8 $(DESTDIR)$(MANDIR)/man8

		119



	The second change in "thttpd-2.29" is in "config.h" where we want to be able to use the "makeweb" program. Here it is making "users" active by copying line 127, adding some extra lines at 130 and pasting the "users" line on line 131, then saving the file. The result will be: (This file is: "config.h".)

		126 #ifdef notdef

		127 #define TILDE_MAP_1 "users"

		128 #define TILDE_MAP_2 "public_html"

		129 #endif

		130 

		131 #define TILDE_MAP_1 "users"

		132 



	The third change in "thttpd-2.29" is in "configure" and is to change where all of the data is written from: "/usr/local" to "/home/local" since the only directory that can be saved when changing operating systems (OS's) is the "/home/" directory, all of the others get over written! This change is in "configure" where line 12 is changed from "/usr/local" to "/home/local", giving the following result, then save the file. (This file is: "configure".)

		 9 

		10 # Defaults:

		11 ac_help=

		12 ac_default_prefix=/home/local

		13 # Any additions from configure.in:

		14 



	This is the end of the changes in "thttpd-2.29"



*****************************


	The "manpage path" is different from "$PATH" so that will be taken care of by just: sudo cp -iav /home/local/man/ /usr/local/man/ which will be done after "thttpd" is up and running, also if one is changing OS's. It seems that Raspberry Pi OS does not have a problem here, but Ubuntu still has a problem!



	If one does an OS change, the other files that need to be changed in "/etc/" are:

		sudo cp -iav /home/local/sbin/thttpd-extras/thttpd-rotate /etc/cron.daily/thttpd-rotate

				# or if you are using the os-debug version,

		sudo cp -iav /home/local/sbin/os-debug/thttpd-rotate  /etc/cron.daily/thttpd-rotate     # this file needs other programs found in "os-debug" see: "readme.txt" in "os-debug".



		sudo cp -iav /home/local/sbin/thttpd-extras/rc.local /etc/rc.local     # Make sure you don't wipe out a file that might already be there!



		sudo cp -iav /home/local/sbin/thttpd-extras/thttpd.sh /etc/thttpd.sh     # This file pulls in the "thttpd_wrapper" which restarts "thttpd" in 10 seconds.



	I think that covers all of the changes, and the ones that one would have to make if changing OS's.



*****************************


Making Ubuntu OS's on the Raspberry Pi.


	I usually go to RaspberryPi.org and download the latest version of "Ubuntu 64 bit Desktop" to the directory "Ubuntu", so I have the code available and all ready downloaded. I got the "rpi-imager" program using:



frank@frank-desktop:~$ snap install rpi-imager     ### 566

frank@frank-desktop:~$      # or it is in "Ubuntu Software" under "Devices and IoT" as "Raspberry Pi Imager".


*****************************

	Formatting media for the Raspberry Pi.

	Anything greater than 32GB needs to be erased so it can have a FAT32 partition on the drive media, using the rpi-imager program. Then installing the OS to the drive. MicroSDHC U1 Cards have a rating of (100 MB/s Read speed, and 10 MB/s Write speed), while microSDXC U3 Cards have a rating of (100MB/s Read speed, and 50MB/s Write speed), 5 times faster on the writes. My 128GB microSDXC U3 Card was rapidly reaching max, and I had several "Seagate, Backup Plus Slim 1TB USB 3.0 drives, (~ 4 3/8" x 3" x 1/2"), of course the erase program failed! But I found an easy solution! The simple solution was using "fdisk" to set the drive up so "rpi-imager" could use it.

	For formatting drives greater than 512 GB, see: "2021-09-07-Formatting-Drives-Greater-Than-512GB.txt".


*****************************

	Some packages that I added:

	First run "sudo apt update" to make sure everything is up to date.



frank@raspberrypi:~ $ sudo apt update     ### 588
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease                             
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease                     
Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease                    
Reading package lists... Done                              
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ sudo apt install dochelp     ### 601
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  dochelp
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 692 kB of archives.
After this operation, 2,858 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 dochelp arm64 0.1.8 [692 kB]
55% [1 dochelp 477 kB/692 kB 69%]
Fetched 692 kB in 3s (208 kB/s)  
Selecting previously unselected package dochelp.
(Reading database ... 92447 files and directories currently installed.)
Preparing to unpack .../dochelp_0.1.8_arm64.deb ...
Unpacking dochelp (0.1.8) ...
Setting up dochelp (0.1.8) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for desktop-file-utils (0.26-1) ...
frank@raspberrypi:~ $ 


	The "Mousepad" text editor does not have a spell checker, so I added "Pluma" which seems to be about the same thing but with a spell checker!


frank@raspberrypi:~ $ sudo apt install pluma     ### 632
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  gir1.2-gtksource-3.0 gir1.2-peas-1.0 gir1.2-pluma-1.0 libpeas-1.0-0 libpeas-common mate-desktop-common pluma-common
The following NEW packages will be installed:
  gir1.2-gtksource-3.0 gir1.2-peas-1.0 gir1.2-pluma-1.0 libpeas-1.0-0 libpeas-common mate-desktop-common pluma pluma-common
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,026 kB of archives.
After this operation, 31.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bullseye/main arm64 gir1.2-gtksource-3.0 arm64 3.24.11-2 [28.4 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 libpeas-common all 1.28.0-2 [53.2 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 libpeas-1.0-0 arm64 1.28.0-2+b1 [62.4 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 gir1.2-peas-1.0 arm64 1.28.0-2+b1 [12.7 kB]
Get:5 http://deb.debian.org/debian bullseye/main arm64 gir1.2-pluma-1.0 arm64 1.24.1-1 [29.8 kB]
Get:6 http://deb.debian.org/debian bullseye/main arm64 mate-desktop-common all 1.24.1-2 [495 kB]
Get:7 http://deb.debian.org/debian bullseye/main arm64 pluma-common all 1.24.1-1 [1,938 kB]
Get:8 http://deb.debian.org/debian bullseye/main arm64 pluma arm64 1.24.1-1 [407 kB]                                                 
Fetched 3,026 kB in 13s (228 kB/s)                                                                                                   
Selecting previously unselected package gir1.2-gtksource-3.0:arm64.
(Reading database ... 92462 files and directories currently installed.)
Preparing to unpack .../0-gir1.2-gtksource-3.0_3.24.11-2_arm64.deb ...
Unpacking gir1.2-gtksource-3.0:arm64 (3.24.11-2) ...
Selecting previously unselected package libpeas-common.
Preparing to unpack .../1-libpeas-common_1.28.0-2_all.deb ...
Unpacking libpeas-common (1.28.0-2) ...
Selecting previously unselected package libpeas-1.0-0:arm64.
Preparing to unpack .../2-libpeas-1.0-0_1.28.0-2+b1_arm64.deb ...
Unpacking libpeas-1.0-0:arm64 (1.28.0-2+b1) ...
Selecting previously unselected package gir1.2-peas-1.0:arm64.
Preparing to unpack .../3-gir1.2-peas-1.0_1.28.0-2+b1_arm64.deb ...
Unpacking gir1.2-peas-1.0:arm64 (1.28.0-2+b1) ...
Selecting previously unselected package gir1.2-pluma-1.0.
Preparing to unpack .../4-gir1.2-pluma-1.0_1.24.1-1_arm64.deb ...
Unpacking gir1.2-pluma-1.0 (1.24.1-1) ...
Selecting previously unselected package mate-desktop-common.
Preparing to unpack .../5-mate-desktop-common_1.24.1-2_all.deb ...
Unpacking mate-desktop-common (1.24.1-2) ...
Selecting previously unselected package pluma-common.
Preparing to unpack .../6-pluma-common_1.24.1-1_all.deb ...
Unpacking pluma-common (1.24.1-1) ...
Selecting previously unselected package pluma.
Preparing to unpack .../7-pluma_1.24.1-1_arm64.deb ...
Unpacking pluma (1.24.1-1) ...
Setting up libpeas-common (1.28.0-2) ...
Setting up mate-desktop-common (1.24.1-2) ...
Setting up gir1.2-gtksource-3.0:arm64 (3.24.11-2) ...
Setting up libpeas-1.0-0:arm64 (1.28.0-2+b1) ...
Setting up pluma-common (1.24.1-1) ...
Setting up gir1.2-pluma-1.0 (1.24.1-1) ...
Setting up gir1.2-peas-1.0:arm64 (1.28.0-2+b1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for libglib2.0-0:arm64 (2.66.8-1) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u2) ...
Setting up pluma (1.24.1-1) ...



frank@raspberrypi:~ $ sudo apt autoremove     ### 699
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libfuse2
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 354 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 93685 files and directories currently installed.)
Removing libfuse2:arm64 (2.9.9-5) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u2) ...
frank@raspberrypi:~ $



#	With the older Pi's with only 512 MB of RAM "Chromium" would choke and not want to run, so I found a "text" browser which works great to test the "thttpd" install since one will only be testing text to see if "thttpd" is functioning right.

 
frank@raspberrypi:~ $ sudo apt install elinks elinks-doc tre-agrep     ### sudo - A text web browser for computers with little RAM. 718
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  elinks-data libev4 libfsplib0 liblua5.1-0 libtre5
The following NEW packages will be installed:
  elinks elinks-data elinks-doc libev4 libfsplib0 liblua5.1-0 libtre5 tre-agrep
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,319 kB of archives.
After this operation, 4,696 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bullseye/main arm64 libev4 arm64 1:4.33-1 [41.3 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 libfsplib0 arm64 0.14-5 [13.5 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 liblua5.1-0 arm64 5.1.5-8.1+b3 [99.5 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 libtre5 arm64 0.8.0-6+b1 [54.6 kB]
Get:5 http://deb.debian.org/debian bullseye/main arm64 elinks-data all 0.13.2-1 [386 kB]
Get:6 http://deb.debian.org/debian bullseye/main arm64 elinks arm64 0.13.2-1+b1 [552 kB]
Get:7 http://deb.debian.org/debian bullseye/main arm64 elinks-doc all 0.13.2-1 [162 kB]
Get:8 http://deb.debian.org/debian bullseye/main arm64 tre-agrep arm64 0.8.0-6+b1 [10.1 kB]
Fetched 1,319 kB in 6s (227 kB/s) 
Selecting previously unselected package libev4:arm64.
(Reading database ... 93672 files and directories currently installed.)
Preparing to unpack .../0-libev4_1%3a4.33-1_arm64.deb ...
Unpacking libev4:arm64 (1:4.33-1) ...
Selecting previously unselected package libfsplib0.
Preparing to unpack .../1-libfsplib0_0.14-5_arm64.deb ...
Unpacking libfsplib0 (0.14-5) ...
Selecting previously unselected package liblua5.1-0:arm64.
Preparing to unpack .../2-liblua5.1-0_5.1.5-8.1+b3_arm64.deb ...
Unpacking liblua5.1-0:arm64 (5.1.5-8.1+b3) ...
Selecting previously unselected package libtre5:arm64.
Preparing to unpack .../3-libtre5_0.8.0-6+b1_arm64.deb ...
Unpacking libtre5:arm64 (0.8.0-6+b1) ...
Selecting previously unselected package elinks-data.
Preparing to unpack .../4-elinks-data_0.13.2-1_all.deb ...
Unpacking elinks-data (0.13.2-1) ...
Selecting previously unselected package elinks.
Preparing to unpack .../5-elinks_0.13.2-1+b1_arm64.deb ...
Unpacking elinks (0.13.2-1+b1) ...
Selecting previously unselected package elinks-doc.
Preparing to unpack .../6-elinks-doc_0.13.2-1_all.deb ...
Unpacking elinks-doc (0.13.2-1) ...
Selecting previously unselected package tre-agrep.
Preparing to unpack .../7-tre-agrep_0.8.0-6+b1_arm64.deb ...
Unpacking tre-agrep (0.8.0-6+b1) ...
Setting up libtre5:arm64 (0.8.0-6+b1) ...
Setting up elinks-data (0.13.2-1) ...
Setting up libev4:arm64 (1:4.33-1) ...
Setting up libfsplib0 (0.14-5) ...
Setting up elinks-doc (0.13.2-1) ...
Setting up tre-agrep (0.8.0-6+b1) ...
Setting up liblua5.1-0:arm64 (5.1.5-8.1+b3) ...
Setting up elinks (0.13.2-1+b1) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u2) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69) ...
frank@raspberrypi:~ $ 



#	"ELinks" operates in a terminal window! For the help line press "Esc", and "q" will ask if you want to quit. Give it a try before you need it. It is small and fast, just what one needs for a system with little resources. The left arrow will take one back one page, and the right arrow will go forward one page.



	At this point one can do: "df -h" to see how much disk space is being used, and "date" to see how long it takes to do the process of installing "thttpd"



frank@raspberrypi:~ $ df -h     ### 787
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G  6.1G   22G  22% /
devtmpfs        1.7G     0  1.7G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           759M  1.3M  758M   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
/dev/mmcblk0p1  253M   31M  222M  12% /boot
tmpfs           380M   24K  380M   1% /run/user/1000


frank@raspberrypi:~ $ date     ### 798
Thu 07 Jul 2022 04:23:02 PM MDT
frank@raspberrypi:~ $ 



*****************************


#	Users and groups that need to be added for "thttpd" to compile.



	In Ubuntu, open a "terminal" full screen, (click on the 9 dots icon in the left "Favorites" column, scroll to the terminal icon, right click and "Add to Favorites" to put it in the left "Favorites" column).



*****************************
*****************************
*****************************


	###     This is the beginning of the "cut and paste" process! 



pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ ### The "~" shows that we are in the "home directory of 'pi'", from the beginning of the line, (/home/pi/).
pi@raspberrypi:~ $ 




frank@raspberrypi:~ $ $PATH     ### 831
bash: /home/local/sbin:/home/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games: No such file or directory


frank@raspberrypi:~ $ cd /etc     ### 835
frank@raspberrypi:/etc $ 


frank@raspberrypi:/etc $ cat group     ### (we are looking for a group "www") 839
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:frank
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:frank
fax:x:21:
voice:x:22:
cdrom:x:24:frank
floppy:x:25:
tape:x:26:
sudo:x:27:frank
audio:x:29:pulse,frank
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:frank
sasl:x:45:
plugdev:x:46:frank
staff:x:50:
games:x:60:frank
users:x:100:frank
nogroup:x:65534:
systemd-journal:x:101:
systemd-network:x:102:
systemd-resolve:x:103:
input:x:104:frank
kvm:x:105:
render:x:106:frank
crontab:x:107:
netdev:x:108:frank
systemd-timesync:x:109:
messagebus:x:110:
ssh:x:111:
bluetooth:x:112:
avahi:x:113:
spi:x:999:frank
i2c:x:998:frank
gpio:x:997:frank
lightdm:x:114:
rdma:x:115:
rtkit:x:116:
lpadmin:x:117:root,frank
ssl-cert:x:118:
pulse:x:119:
pulse-access:x:120:
scanner:x:121:saned
saned:x:122:
colord:x:123:
systemd-coredump:x:996:
frank:x:1000:
frank@raspberrypi:/etc $ 



# Since there is no group "www" with the user "(pi)" we will need to add this, getting the directions by using "addgroup --help" to see our options.



frank@raspberrypi:/etc $ addgroup --help     ### 915
adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID]
[--disabled-password] [--disabled-login] [--add_extra_groups] USER
   Add a normal user

adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password]
[--disabled-login] [--add_extra_groups] USER
   Add a system user

adduser --group [--gid ID] GROUP
addgroup [--gid ID] GROUP
   Add a user group

addgroup --system [--gid ID] GROUP
   Add a system group

adduser USER GROUP
   Add an existing user to an existing group

general options:
  --quiet | -q      don't give process information to stdout
  --force-badname   allow usernames which do not match the
                    NAME_REGEX configuration variable
  --help | -h       usage message
  --version | -v    version number and copyright
  --conf | -c FILE  use FILE as configuration file

frank@raspberrypi:/etc $ 



# *****************************

# From this we get the commands we need to add a system group "www" and make "(pi)" a member of this group.

# *********

#    Add a system group

# *********

# adduser USER GROUP
#    Add an existing user to an existing group

# *********

# We need to add a system group "www" and make "(pi)" a member of this group.



frank@raspberrypi:/etc $ sudo addgroup --system www     ### sudo 967
Adding group `www' (GID 124) ...
Done.
frank@raspberrypi:/etc $ 


# *********



frank@raspberrypi:/etc $ sudo adduser frank www     ### sudo 977
Adding user `frank' to group `www' ...
Adding user frank to group www
Done.
frank@raspberrypi:/etc $ 


# **************



frank@raspberrypi:/etc $ cat group     ### 988
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:frank
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:frank
fax:x:21:
voice:x:22:
cdrom:x:24:frank
floppy:x:25:
tape:x:26:
sudo:x:27:frank
audio:x:29:pulse,frank
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:frank
sasl:x:45:
plugdev:x:46:frank
staff:x:50:
games:x:60:frank
users:x:100:frank
nogroup:x:65534:
systemd-journal:x:101:
systemd-network:x:102:
systemd-resolve:x:103:
input:x:104:frank
kvm:x:105:
render:x:106:frank
crontab:x:107:
netdev:x:108:frank
systemd-timesync:x:109:
messagebus:x:110:
ssh:x:111:
bluetooth:x:112:
avahi:x:113:
spi:x:999:frank
i2c:x:998:frank
gpio:x:997:frank
lightdm:x:114:
rdma:x:115:
rtkit:x:116:
lpadmin:x:117:root,frank
ssl-cert:x:118:
pulse:x:119:
pulse-access:x:120:
scanner:x:121:saned
saned:x:122:
colord:x:123:
systemd-coredump:x:996:
frank:x:1000:
www:x:124:frank
frank@raspberrypi:/etc $ 



# Success, Group "www" has a user "(pi)" and is also less than 1000, (the number will probably be different than 124).


# *****************************


# The idea is to use the "users" accounts as if they were the header choices that are normally at the top of a web page. For my site, I have: ac0xl, delinquent-accounts, documents, downloads, freedom, memes, music, notices, pictures, rome, searles-sav-on-propane, va, and videos. The files: favicon.ico, readme.txt, and robots.txt and sitemap.xml (if you are using the IP Address option) are web site files that get added later. The idea is to make a list of the things you want on your web site and type them up so you can select the name and then copy and paste it later when all of the users get added. This will save a lot of typing and typing mistakes!


#	For the initial primary user, which should be at the top of the list, one could use "a0" an "a" and a "zero", since in the "ASCII Character Set" an "a" is "61 hex" and a "zero" is "30 hex" and should be one of the normal things that should end up on the top of the list. If you are running a different Character Set, your choice might be different. The different user accounts to start with will be: a0, documents, downloads, memes, music, notices, pictures, and videos (in "list.txt"). Other "users" can be added later as your site starts to grow. ("user" is expecting a name which starts with a lower case letter.)



frank@raspberrypi:/etc $ cd ~/freedom/Acme.com/thttpd-2.29     ### 1074
frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 



# Now that your list of ideas for your web site is growing, it is time to start the process of installing "thttpd". The first thing to do is make sure the above files in "thttpd-2.29" have all been changed. If not, make the changes and check again. All of these commands will be made in the terminal window under: "/home/(pi)/freedom/Acme.come/thttpd-2.29"     # This equates to "~/freedom/Acme.com/thttpd-2.29"
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 



frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ ls     ### 1084
aclocal.m4    config.log     extras      INSTALL     Makefile.in         mime_types.h    scripts        thttpd.8  TODO
cgi-bin       config.status  fdwatch.c   install-sh  match.c             mime_types.txt  strerror.c     thttpd.c  version.h
cgi-src       config.sub     fdwatch.h   libhttpd.c  match.h             mmc.c           tdate_parse.c  thttpd.o
config.cache  configure      fdwatch.o   libhttpd.h  match.o             mmc.h           tdate_parse.h  timers.c
config.guess  configure.in   FILES       libhttpd.o  mime_encodings.h    mmc.o           tdate_parse.o  timers.h
config.h      contrib        index.html  Makefile    mime_encodings.txt  README          thttpd         timers.o
frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 
frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 



# At this point you should see the above files and one called "INSTALL", which begins with:
# 1     To build:
# 2
# 3    % ./configure
# 4
# 5    Edit config.h to change the configuration options if necessary.
# 6
# 7    % make
# 8
# 9
# 10    To install:
# 11
# 12    % make install
# 13
# 14    Edit one of your system rc files to run thttpd at boot time.  Do NOT
# 15    run it from inetd, that setup is inefficient so thttpd doesn't support it.
# 16



# ***** Since this program has been run before, the first command needs to be: "make clean", to clear all of the old data.*****

# If you have run the program before, or have had errors, at the terminal prompt, type in: "make clean" without the quotes, to clean the old files. (DO IT!).

# (The "%" is the computer prompt: type in: ./configure   # and then a return.)



# ***** Starting the compile. *****


# "make clean" may say:
# make: *** No rule to make target 'clean'.  Stop.    # Or a short list of files and directories that have been removed.



# *************** Step one.



frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ date     ### 1136
Thu 07 Jul 2022 04:40:18 PM MDT




frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ make clean     ### Step one. 1142
for i in cgi-src extras ; do ( \
    cd $i ; \
    pwd ; \
    make  clean \
) ; done
/home/frank/freedom/Acme.com/thttpd-2.29/cgi-src
make[1]: Entering directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/cgi-src'
rm -f *.o redirect ssi phf
make[1]: Leaving directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/cgi-src'
/home/frank/freedom/Acme.com/thttpd-2.29/extras
make[1]: Entering directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/extras'
rm -f *.o makeweb htpasswd
make[1]: Leaving directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/extras'
rm -f thttpd thttpd.o libhttpd.o fdwatch.o mmc.o timers.o match.o tdate_parse.o   mime_encodings.h mime_types.h
frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 




# *************** Step two.     This blew up because I had used a USB Flash drive to copy "freedom" to a new machine and Microsoft file systems will wipe out all execute attributes.

frank@ac0xl-Pi-B-2:~/freedom/Acme.com/thttpd-2.29 $ ./configure     ### Step two. "./configure" expects an exicutable file! - Thus:
bash: ./configure: Permission denied     ### "freedom" has to be copied using a linux file system!!! You need to use a linux formatted file system preferably on a SD card. I later ended up recompiling "thttpd" and that is what I should have done at this point!

#*******  If you get this recopy "freedom" using linux formatted media!!! and start again! with Step one - make clean *******
#*******    cd ~/freedom/Acme.com/thttpd-2.29     ###     then: make clean     ### Step one.    *******



# *************** Step two.     


frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ ./configure     ### Step two. 1175
loading cache ./config.cache
checking host system type... Invalid configuration `aarch64-pc-linux-gnuoldld': machine `aarch64-pc' not recognized

checking target system type... Invalid configuration `aarch64-pc-linux-gnuoldld': machine `aarch64-pc' not recognized

checking build system type... Invalid configuration `aarch64-pc-linux-gnuoldld': machine `aarch64-pc' not recognized

checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking gcc version... (cached) 10
checking how to link static binaries... (cached) unknown
checking for __progname... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking for fcntl.h... (cached) yes
checking for grp.h... (cached) yes
checking for memory.h... (cached) yes
checking for paths.h... (cached) yes
checking for poll.h... (cached) yes
checking for sys/poll.h... (cached) yes
checking for sys/devpoll.h... (cached) no
checking for sys/event.h... (cached) no
checking for osreldate.h... (cached) no
checking whether time.h and sys/time.h may both be included... (cached) yes
checking for dirent.h that defines DIR... (cached) yes
checking for opendir in -ldir... (cached) no
checking for /usr/local/v6/lib... no
checking for gethostbyname... (cached) yes
checking for socket... (cached) yes
checking for main in -linet6... (cached) no
checking for crypt... (cached) no
checking for crypt in -lcrypt... (cached) yes
checking for hstrerror... (cached) yes
checking for strerror... (cached) yes
checking for waitpid... (cached) yes
checking for vsnprintf... (cached) yes
checking for daemon... (cached) yes
checking for setsid... (cached) yes
checking for setlogin... (cached) no
checking for getaddrinfo... (cached) yes
checking for getnameinfo... (cached) yes
checking for gai_strerror... (cached) yes
checking for kqueue... (cached) no
checking for sigset... (cached) yes
checking for atoll... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... (cached) yes
checking for select... (cached) yes
checking for poll... (cached) yes
checking if struct tm has tm_gmtoff member... (cached) yes
checking if int64_t exists... (cached) yes
checking if socklen_t exists... (cached) yes
checking whether make sets ${MAKE}... (cached) yes
checking for a BSD compatible install... (cached) /usr/bin/install -c
creating ./config.status
creating Makefile
creating cgi-src/Makefile
creating extras/Makefile
frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 




# *******************	### Step three.

# The next step: "make" will generate more pages and should end with something like this:

# The warnings will pause but should continue so do not panic, just give it time to continue!




frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ make     ### Step three. 1251
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I. -c thttpd.c
thttpd.c: In function ‘main’:
thttpd.c:611:12: warning: implicit declaration of function ‘sigset’; did you mean ‘isset’? [-Wimplicit-function-declaration]
  611 |     (void) sigset( SIGTERM, handle_term );
      |            ^~~~~~
      |            isset
rm -f mime_encodings.h
sed < mime_encodings.txt > mime_encodings.h \
  -e 's/#.*//' -e 's/[ 	]*$//' -e '/^$/d' \
  -e 's/[ 	][ 	]*/", 0, "/' -e 's/^/{ "/' -e 's/$/", 0 },/'
rm -f mime_types.h
sed < mime_types.txt > mime_types.h \
  -e 's/#.*//' -e 's/[ 	]*$//' -e '/^$/d' \
  -e 's/[ 	][ 	]*/", 0, "/' -e 's/^/{ "/' -e 's/$/", 0 },/'
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I. -c libhttpd.c
libhttpd.c: In function ‘cgi_child’:
libhttpd.c:3557:12: warning: implicit declaration of function ‘sigset’; did you mean ‘isset’? [-Wimplicit-function-declaration]
 3557 |     (void) sigset( SIGPIPE, SIG_DFL );
      |            ^~~~~~
      |            isset
libhttpd.c: In function ‘ls’:
libhttpd.c:2846:10: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
 2846 |   (void) strncpy( nameptrs[nnames], de->d_name, namlen );
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libhttpd.c:64:25: note: length computed here
   64 | # define NAMLEN(dirent) strlen((dirent)->d_name)
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~
libhttpd.c:2845:12: note: in expansion of macro ‘NAMLEN’
 2845 |   namlen = NAMLEN(de);
      |            ^~~~~~
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I. -c fdwatch.c
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I. -c mmc.c
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I. -c timers.c
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I. -c match.c
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I. -c tdate_parse.c
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I.  -o thttpd thttpd.o libhttpd.o fdwatch.o mmc.o timers.o match.o tdate_parse.o  -lcrypt  
for i in cgi-src extras ; do ( \
    cd $i ; \
    pwd ; \
    make  \
	WEBDIR=/home/local/www \
	CGIBINDIR=/home/local/www/cgi-bin \
	MANDIR=/home/local/man \
	WEBGROUP=www \
) ; done
/home/frank/freedom/Acme.com/thttpd-2.29/cgi-src
make[1]: Entering directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/cgi-src'
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I.. -c redirect.c
gcc   redirect.o -lcrypt  -o redirect
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I.. -c ssi.c
ssi.c: In function ‘get_filename.constprop’:
ssi.c:183:9: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
  183 |  (void) strncpy( fn, filename, fl - vl );
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ssi.c:169:10: note: length computed here
  169 |     fl = strlen( filename );
      |          ^~~~~~~~~~~~~~~~~~
gcc   ssi.o ../match.o -lcrypt  -o ssi
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I.. -c phf.c
gcc   phf.o -lcrypt  -o phf
make[1]: Leaving directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/cgi-src'
/home/frank/freedom/Acme.com/thttpd-2.29/extras
make[1]: Entering directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/extras'
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I.. -DWEBDIR=\"/home/local/www\" -c makeweb.c
gcc  makeweb.o -o makeweb -lcrypt  
gcc -O2 -DHAVE__PROGNAME=1 -DHAVE_FCNTL_H=1 -DHAVE_GRP_H=1 -DHAVE_MEMORY_H=1 -DHAVE_PATHS_H=1 -DHAVE_POLL_H=1 -DHAVE_SYS_POLL_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBCRYPT=1 -DHAVE_STRERROR=1 -DHAVE_WAITPID=1 -DHAVE_VSNPRINTF=1 -DHAVE_DAEMON=1 -DHAVE_SETSID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_SIGSET=1 -DHAVE_ATOLL=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_SELECT=1 -DHAVE_POLL=1 -DHAVE_TM_GMTOFF=1 -DHAVE_INT64T=1 -DHAVE_SOCKLENT=1  -I.. -DWEBDIR=\"/home/local/www\" -c htpasswd.c
gcc   htpasswd.o -o htpasswd -lcrypt 
make[1]: Leaving directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/extras'
frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 




# *************** Step four.



# The last step demands being "root" so it is: "sudo make install" which should end with something like this: 




frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ sudo make install     ### sudo  Step four. 1334
mkdir -p /home/local/sbin
/usr/bin/install -c -m 555 -o bin -g bin thttpd /home/local/sbin
mkdir -p /home/local/man/man1
mkdir -p /home/local/man/man8
/usr/bin/install -c -m 444 -o bin -g bin thttpd.8 /home/local/man/man8
for i in cgi-src extras ; do ( \
    cd $i ; \
    pwd ; \
    make  \
	WEBDIR=/home/local/www \
	CGIBINDIR=/home/local/www/cgi-bin \
	MANDIR=/home/local/man \
	WEBGROUP=www \
	install \
) ; done
/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/cgi-src
make[1]: Entering directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/cgi-src'
mkdir -p /home/local/www/cgi-bin
rm -f /home/local/www/cgi-bin/redirect
cp redirect /home/local/www/cgi-bin/redirect
rm -f /home/local/man/man8/redirect.8
cp redirect.8 /home/local/man/man8/redirect.8
rm -f /home/local/www/cgi-bin/ssi
cp ssi /home/local/www/cgi-bin/ssi
rm -f /home/local/man/man8/ssi.8
cp ssi.8 /home/local/man/man8/ssi.8
rm -f /home/local/www/cgi-bin/phf
cp phf /home/local/www/cgi-bin/phf
make[1]: Leaving directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/cgi-src'
/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/extras
make[1]: Entering directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/extras'
rm -f /home/local/sbin/makeweb /home/local/sbin/htpasswd /home/local/sbin/syslogtocern
cp makeweb /home/local/sbin/makeweb
chgrp www /home/local/sbin/makeweb
chmod 2755 /home/local/sbin/makeweb
cp htpasswd /home/local/sbin/htpasswd
cp syslogtocern /home/local/sbin/syslogtocern
rm -f /home/local/man/man1/makeweb.1
cp makeweb.1 /home/local/man/man1/makeweb.1
rm -f /home/local/man/man1/htpasswd.1
cp htpasswd.1 /home/local/man/man1/htpasswd.1
rm -f /home/local/man/man8/syslogtocern.8
cp syslogtocern.8 /home/local/man/man8/syslogtocern.8
make[1]: Leaving directory '/home/frank/freedom-new-05-19-2022/freedom/Acme.com/thttpd-2.29/extras'
frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 




# Some errors will be reported since the ARM names are not in its database and will not be optimized for the processor, but don't worry. If the file ends with an error report, look back up a few lines and it will probably say what the problem was that created the error. The easy way is to just set up this page along with a terminal screen and then copy the command and paste it onto the terminal command line. This is how I will be testing the install file, and making a copy of it if you need it.




frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ date     ### 1389
Thu 07 Jul 2022 04:45:27 PM MDT



# *****************************



frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ ### "thttpd" is now installed. 1398
frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 




### The next thing is to add directories "logs" and "users" to the "www" directory.




frank@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ cd /home/local/www     ### 1409
frank@raspberrypi:/home/local/www $ 



frank@raspberrypi:/home/local/www $ ls -al     ### 1414
total 12
drwxr-xr-x 3 root root 4096 Jul  7 16:44 .
drwxr-xr-x 5 root root 4096 Jul  7 16:44 ..
drwxr-xr-x 2 root root 4096 Jul  7 16:44 cgi-bin
frank@raspberrypi:/home/local/www $ 



frank@raspberrypi:/home/local/www $ sudo mkdir -v logs users     ### sudo 1423
mkdir: created directory 'logs'
mkdir: created directory 'users'
frank@raspberrypi:/home/local/www $ 



frank@raspberrypi:/home/local/www $ ls -al     ### 1430
total 20
drwxr-xr-x 5 root root 4096 Jul  7 16:47 .
drwxr-xr-x 5 root root 4096 Jul  7 16:44 ..
drwxr-xr-x 2 root root 4096 Jul  7 16:44 cgi-bin
drwxr-xr-x 2 root root 4096 Jul  7 16:47 logs
drwxr-xr-x 2 root root 4096 Jul  7 16:47 users
frank@raspberrypi:/home/local/www $ 




# ********* We need this!

### ***** Now we need to change the permissions on "users", so those in the "www" group can write to this directory!***** 




frank@raspberrypi:/home/local/www $ sudo chmod -v 775 users     ### sudo 1449
mode of 'users' changed from 0755 (rwxr-xr-x) to 0775 (rwxrwxr-x)
frank@raspberrypi:/home/local/www $ 



frank@raspberrypi:/home/local/www $ ls -al     ### 1455
total 20
drwxr-xr-x 5 root root 4096 Jul  7 16:47 .
drwxr-xr-x 5 root root 4096 Jul  7 16:44 ..
drwxr-xr-x 2 root root 4096 Jul  7 16:44 cgi-bin
drwxr-xr-x 2 root root 4096 Jul  7 16:47 logs
drwxrwxr-x 2 root root 4096 Jul  7 16:47 users
frank@raspberrypi:/home/local/www $ 
frank@raspberrypi:/home/local/www $ ### Make sure users is now 0775 (drwxrwxr-x). 1463
frank@raspberrypi:/home/local/www $ 


# *******************

 
### Now we go back one level so we can change the owner and group on everything in the "www" directory from "root:root" to "root:www".




frank@raspberrypi:/home/local/www $ cd ../     ### 1475
frank@raspberrypi:/home/local $ 



frank@raspberrypi:/home/local $ sudo chown -vR root:www www     ### sudo 1480
changed ownership of 'www/users' from root:root to root:www
changed ownership of 'www/cgi-bin/ssi' from root:root to root:www
changed ownership of 'www/cgi-bin/phf' from root:root to root:www
changed ownership of 'www/cgi-bin/redirect' from root:root to root:www
changed ownership of 'www/cgi-bin' from root:root to root:www
changed ownership of 'www/logs' from root:root to root:www
changed ownership of 'www' from root:root to root:www
frank@raspberrypi:/home/local $ 



frank@raspberrypi:/home/local $ ls -al     ### 1492
total 20
drwxr-xr-x 5 root root 4096 Jul  7 16:44 .
drwxr-xr-x 4 root root 4096 Jul  7 16:44 ..
drwxr-xr-x 4 root root 4096 Jul  7 16:44 man
drwxr-xr-x 2 root root 4096 Jul  7 16:44 sbin
drwxr-xr-x 5 root www  4096 Jul  7 16:47 www
frank@raspberrypi:/home/local $ 



# *********



### We now change back to the "(pi)" home directory and are going to add a "user" that belongs in the "www" group, from the help on "adduser" we see what we have to type.



frank@raspberrypi:/home/local $ cd     ### 1511
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ addgroup --help     ### 1516
adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID]
[--disabled-password] [--disabled-login] [--add_extra_groups] USER
   Add a normal user

adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password]
[--disabled-login] [--add_extra_groups] USER
   Add a system user

adduser --group [--gid ID] GROUP
addgroup [--gid ID] GROUP
   Add a user group

addgroup --system [--gid ID] GROUP
   Add a system group

adduser USER GROUP
   Add an existing user to an existing group

general options:
  --quiet | -q      don't give process information to stdout
  --force-badname   allow usernames which do not match the
                    NAME_REGEX configuration variable
  --help | -h       usage message
  --version | -v    version number and copyright
  --conf | -c FILE  use FILE as configuration file

frank@raspberrypi:~ $ 




### For an example, one can think of these as different tabs or categories on your website. Use a different password for these "users" than the one you use for "(pi)" for more security. The information it asks for was for the "finger" program which most computers don't run for security reasons. I usually just use the "user" for the name and leave the rest blank.

#	This is where one should probably use "a0" "a" (61 hex) and "0" zero (30 hex), so it will be the master user and at the top of the list for any other users one might add. "a0" is where you can put your log files.




frank@raspberrypi:~ $ sudo adduser --add_extra_groups a0     ### sudo 1557
Adding user `a0' ...
Adding new group `a0' (1001) ...
Adding new user `a0' (1001) with group `a0' ...
Creating home directory `/home/a0' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for a0
Enter the new value, or press ENTER for the default

	Full Name []: a0
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
Adding new user `a0' to extra groups ...
Adding user `a0' to group `dialout' ...
Adding user `a0' to group `cdrom' ...
Adding user `a0' to group `floppy' ...
Adding user `a0' to group `audio' ...
Adding user `a0' to group `video' ...
Adding user `a0' to group `plugdev' ...
Adding user `a0' to group `users' ...
frank@raspberrypi:~ $



### adduser USER GROUP

###    Add an existing user to an existing group

# 	Again this would be the "a0".




frank@raspberrypi:~ $ sudo adduser a0 www     ### sudo adduser XXXX to group yyy. 1596
Adding user `a0' to group `www' ...
Adding user a0 to group www
Done.
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ su a0     ### Change to user "a0" 1604
Password: 
a0@raspberrypi:/home/frank $ 



a0@AC0XL-Pi-400:/home/pi $ # here we are still in "/home/pi", and the user is now "a0".



a0@raspberrypi:/home/frank $ cd     ### Change to the "a0" home directory. 1614
a0@raspberrypi:~ $ 



a0@raspberrypi:~ $ ls -al     ### 1619
total 24
drwxr-xr-x 2 a0   a0   4096 Jul  7 16:51 .
drwxr-xr-x 5 root root 4096 Jul  7 16:51 ..
-rw-r--r-- 1 a0   a0    220 Jul  7 16:51 .bash_logout
-rw-r--r-- 1 a0   a0   3523 Jul  7 16:51 .bashrc
-rw-r--r-- 1 a0   a0   1670 Jul  7 16:51 .mkshrc
-rw-r--r-- 1 a0   a0    807 Jul  7 16:51 .profile
a0@raspberrypi:~ $ 


a0@raspberrypi:~ $ touch .1001     ### Since the computer uses numbers instead of names this is one way to know what number a user is. The period before the number will keep it from copying to the web page since it makes the file hidden. 1630
a0@raspberrypi:~ $ 



### if makeweb does not work (no permission) did you?: sudo chmod -v 0775 /home/local/www/users     #? and it actually changed the permissions to (drwxrwxr-x)?



a0@raspberrypi:~ $ makeweb     ### 1639
Created web directory /home/local/www/users/a0
Created symbolic link /home/a0/public_html
a0@raspberrypi:~ $ 



a0@raspberrypi:~ $ ls -al     ### 1646
total 24
drwxr-xr-x 2 a0   a0   4096 Jul  7 16:55 .
drwxr-xr-x 5 root root 4096 Jul  7 16:51 ..
-rw-r--r-- 1 a0   a0      0 Jul  7 16:54 .1001
-rw-r--r-- 1 a0   a0    220 Jul  7 16:51 .bash_logout
-rw-r--r-- 1 a0   a0   3523 Jul  7 16:51 .bashrc
-rw-r--r-- 1 a0   a0   1670 Jul  7 16:51 .mkshrc
-rw-r--r-- 1 a0   a0    807 Jul  7 16:51 .profile
lrwxrwxrwx 1 a0   www    24 Jul  7 16:55 public_html -> /home/local/www/users/a0
a0@raspberrypi:~ $ 



a0@raspberrypi:~ $ exit     ### This lets us exit back to where we were. 1660
exit
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ cat /etc/group     ### 1666
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:frank
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:frank,a0
fax:x:21:
voice:x:22:
cdrom:x:24:frank,a0
floppy:x:25:a0
tape:x:26:
sudo:x:27:frank
audio:x:29:pulse,frank,a0
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:frank,a0
sasl:x:45:
plugdev:x:46:frank,a0
staff:x:50:
games:x:60:frank
users:x:100:frank,a0
nogroup:x:65534:
systemd-journal:x:101:
systemd-network:x:102:
systemd-resolve:x:103:
input:x:104:frank
kvm:x:105:
render:x:106:frank
crontab:x:107:
netdev:x:108:frank
systemd-timesync:x:109:
messagebus:x:110:
ssh:x:111:
bluetooth:x:112:
avahi:x:113:
spi:x:999:frank
i2c:x:998:frank
gpio:x:997:frank
lightdm:x:114:
rdma:x:115:
rtkit:x:116:
lpadmin:x:117:root,frank
ssl-cert:x:118:
pulse:x:119:
pulse-access:x:120:
scanner:x:121:saned
saned:x:122:
colord:x:123:
systemd-coredump:x:996:
frank:x:1000:
www:x:124:frank,a0
a0:x:1001:
frank@raspberrypi:~ $ 



# **************



frank@raspberrypi:~ $ cd /home     ### 1744
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ ls -al     ### 1748
total 20
drwxr-xr-x  5 root  root  4096 Jul  7 16:51 .
drwxr-xr-x 21 root  root  4096 Jul  7 16:12 ..
drwxr-xr-x  2 a0    a0    4096 Jul  7 16:56 a0
drwxr-xr-x 17 frank frank 4096 Jul  7 16:34 frank
drwxr-xr-x  5 root  root  4096 Jul  7 16:44 local
frank@raspberrypi:/home $ 



### Since I want to be able to access "a0" from "frank" I will change the group on "a0" to "www".



frank@raspberrypi:/home $ sudo chown -vR a0:www a0     ### sudo 1763
changed ownership of 'a0/.1001' from a0:a0 to a0:www
changed ownership of 'a0/.bashrc' from a0:a0 to a0:www
changed ownership of 'a0/.bash_logout' from a0:a0 to a0:www
changed ownership of 'a0/.mkshrc' from a0:a0 to a0:www
changed ownership of 'a0/.bash_history' from a0:a0 to a0:www
changed ownership of 'a0/.profile' from a0:a0 to a0:www
ownership of 'a0/public_html' retained as a0:www
changed ownership of 'a0' from a0:a0 to a0:www
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ ls -al     ### 1775
total 20
drwxr-xr-x  5 root  root  4096 Jul  7 16:51 .
drwxr-xr-x 21 root  root  4096 Jul  7 16:12 ..
drwxr-xr-x  2 a0    www   4096 Jul  7 16:56 a0
drwxr-xr-x 17 frank frank 4096 Jul  7 16:34 frank
drwxr-xr-x  5 root  root  4096 Jul  7 16:44 local
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ cd /home/local/www/users     ### 1785
frank@raspberrypi:/home/local/www/users $ 



frank@raspberrypi:/home/local/www/users $ ls -al     ### 1790
total 12
drwxrwxr-x 3 root www 4096 Jul  7 16:55 .
drwxr-xr-x 5 root www 4096 Jul  7 16:47 ..
drwxr-xr-x 2 a0   a0  4096 Jul  7 16:55 a0
frank@raspberrypi:/home/local/www/users $ 



### Since I want to be able to access "a0" from "frank" I will change the group on "a0" to "www".



frank@raspberrypi:/home/local/www/users $ sudo chown -vR a0:www a0     ### sudo 1803
changed ownership of 'a0' from a0:a0 to a0:www
frank@raspberrypi:/home/local/www/users $ 



frank@raspberrypi:/home/local/www/users $ ls -al     ### 1809
total 12
drwxrwxr-x 3 root www 4096 Jul  7 16:55 .
drwxr-xr-x 5 root www 4096 Jul  7 16:47 ..
drwxr-xr-x 2 a0   www 4096 Jul  7 16:55 a0
frank@raspberrypi:/home/local/www/users $ 


# So far so good! We now have a main www user installed.


frank@raspberrypi:/home/local/www/users $ date     ### 1820
Thu 07 Jul 2022 05:16:08 PM MDT
frank@raspberrypi:/home/local/www/users $



# *****************************


### I liked the "anvil_thttpd.gif" on the Acme.com website and chose it as my favicon.ico by renaming a copy to favicon.ico. An "anvil" is built to be hammered on without failing, and "thttpd" is built to take a hammering without failing. It is bullet proof! When you look at your logs you will see how "thttpd" will block all sorts of attempts to break your website! You will also get an idea of things to avoid on your website.


# *****



frank@raspberrypi:/home/local/www/users $ cd /home/local/sbin     ### 1836
frank@raspberrypi:/home/local/sbin $ 



frank@raspberrypi:/home/local/sbin $ ls -al     ### 1841
total 164
drwxr-xr-x 2 root root   4096 Jul  7 16:44 .
drwxr-xr-x 5 root root   4096 Jul  7 16:44 ..
-rwxr-xr-x 1 root root  15296 Jul  7 16:44 htpasswd
-rwxr-sr-x 1 root www   14504 Jul  7 16:44 makeweb
-r-xr-xr-x 1 root root   2878 Jul  7 16:44 syslogtocern
-r-xr-xr-x 1 bin  bin  121272 Jul  7 16:44 thttpd
frank@raspberrypi:/home/local/sbin $ 



frank@raspberrypi:/home/local/sbin $ cd ~/freedom     ### (The directory "freedom" should be in "/home/(pi)/"). 1853
frank@raspberrypi:~/freedom $ 


frank@raspberrypi:~/freedom $ ls -al     ### 1857
total 812
drwxr-xr-x  7 frank frank   4096 Jul  7 17:15  .
drwxr-xr-x  5 frank frank   4096 Jul  7 14:06  ..
-r--r--r--  1 frank frank  32014 Jan  8  2020  2010Website.pdf
-r--r--r--  1 frank frank  11024 Jan  8  2020  2019-09-05-Project.txt
-r--r--r--  1 frank frank  11941 Jan  8  2020  2019-10-01-website.txt
-r--r--r--  1 frank frank   6365 Jan  8  2020  2019-11-26-web-server.txt
-r--r--r--  1 frank frank  21340 Jan  8  2020  2019-12-06-Google-Search-Is-Broken.txt
-rw-r--r--  1 frank frank  12817 Jun 14 17:21  2020-07-17-thttpd.txt
-r--r--r--  1 frank frank  17955 Sep 10  2021  2021-09-01.txt
-r--r--r--  1 frank frank  18393 Sep 11  2021  2021-09-07-Formatting-Drives-Greater-Than-512GB.txt
-rw-r--r--  1 frank frank 215649 Jul  7 17:15  2022-06-13-Install-thttpd-on-32-or-64-bit-OS.txt
-rw-r--r--  1 frank frank 216934 Jul  6 15:30  2022-06-15-ac0xl-Pi-B-2.txt
-rw-r--r--  1 frank frank  32869 Jul  7 16:37  2022-07-07-thttpd-install-32-bit-or-64-bit.txt
drwxr-xr-x 22 frank frank   4096 Jul  7 12:03  Acme.com
-rw-r--r--  1 frank frank  24052 Mar 23 15:18  command-line-PATH-bug.txt
drwxr-xr-x  4 frank frank   4096 Jul  7 12:03 'HTML Sampler_files'
-r--r--r--  1 frank frank  26907 Aug 16  2021 'HTML Sampler.html'
-rw-r--r--  1 frank frank     85 Jun  7 13:17  list.txt
drwxr-xr-x  2 frank frank   4096 Jul  7 12:03  os-debug
-rw-r--r--  1 frank frank  25893 Jun  7 13:04  readme.txt
-r--r--r--  1 frank frank  80728 Sep  8  2021  rfc3875-CGI.txt
-r--r--r--  1 frank frank    186 Jan  8  2020  sitemap.xml
-r--r--r--  1 frank frank    186 Jan  8  2020  sitemap.xml.txt
-rwxr-xr--  1 frank frank    501 Jun  7 16:20  thttpd_config
-r-xr-xr--  1 frank frank    501 Jun  7 16:20  thttpd_config~
drwxr-xr-x  3 frank frank   4096 Jul  7 12:03  thttpd-extras
drwxr-xr-x  4 frank frank   4096 Jul  7 12:03  vhost-DN-test
frank@raspberrypi:~/freedom $ 



frank@raspberrypi:~/freedom $ sudo cp -av thttpd-extras /home/local/sbin/     ### sudo 1890
'thttpd-extras' -> '/home/local/sbin/thttpd-extras'
'thttpd-extras/thttpd.sh' -> '/home/local/sbin/thttpd-extras/thttpd.sh'
'thttpd-extras/thttpd_config' -> '/home/local/sbin/thttpd-extras/thttpd_config'
'thttpd-extras/anvil_thttpd.gif' -> '/home/local/sbin/thttpd-extras/anvil_thttpd.gif'
'thttpd-extras/readme.txt' -> '/home/local/sbin/thttpd-extras/readme.txt'
'thttpd-extras/thttpd-rotate~' -> '/home/local/sbin/thttpd-extras/thttpd-rotate~'
'thttpd-extras/thttpd.sh~' -> '/home/local/sbin/thttpd-extras/thttpd.sh~'
'thttpd-extras/thttpd_config~' -> '/home/local/sbin/thttpd-extras/thttpd_config~'
'thttpd-extras/sitemap.xml' -> '/home/local/sbin/thttpd-extras/sitemap.xml'
'thttpd-extras/thttpd-rotate' -> '/home/local/sbin/thttpd-extras/thttpd-rotate'
'thttpd-extras/sitemap.xml.txt' -> '/home/local/sbin/thttpd-extras/sitemap.xml.txt'
'thttpd-extras/favicon.ico' -> '/home/local/sbin/thttpd-extras/favicon.ico'
'thttpd-extras/rc.local~' -> '/home/local/sbin/thttpd-extras/rc.local~'
'thttpd-extras/thttpd_wrapper' -> '/home/local/sbin/thttpd-extras/thttpd_wrapper'
'thttpd-extras/robots-site.txt' -> '/home/local/sbin/thttpd-extras/robots-site.txt'
'thttpd-extras/robots.txt' -> '/home/local/sbin/thttpd-extras/robots.txt'
'thttpd-extras/rc.local' -> '/home/local/sbin/thttpd-extras/rc.local'
'thttpd-extras/thttpd_wrapper~' -> '/home/local/sbin/thttpd-extras/thttpd_wrapper~'
'thttpd-extras/vhost-DN-test' -> '/home/local/sbin/thttpd-extras/vhost-DN-test'
'thttpd-extras/vhost-DN-test/192.168.1.128' -> '/home/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128'
'thttpd-extras/vhost-DN-test/192.168.1.128/a0' -> '/home/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128/a0'
'thttpd-extras/vhost-DN-test/192.168.1.128/sample.txt' -> '/home/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128/sample.txt'
'thttpd-extras/vhost-DN-test/a0' -> '/home/local/sbin/thttpd-extras/vhost-DN-test/a0'
'thttpd-extras/vhost-DN-test/a0/test' -> '/home/local/sbin/thttpd-extras/vhost-DN-test/a0/test'
frank@raspberrypi:~/freedom $ 



frank@raspberrypi:~/freedom $ sudo cp -av os-debug /home/local/sbin/     ### sudo 1919
'os-debug' -> '/home/local/sbin/os-debug'
'os-debug/readme.txt~' -> '/home/local/sbin/os-debug/readme.txt~'
'os-debug/readme.txt' -> '/home/local/sbin/os-debug/readme.txt'
'os-debug/dead-thttpd' -> '/home/local/sbin/os-debug/dead-thttpd'
'os-debug/thttpd-rotate~' -> '/home/local/sbin/os-debug/thttpd-rotate~'
'os-debug/thttpd-rotate' -> '/home/local/sbin/os-debug/thttpd-rotate'
'os-debug/datelog~' -> '/home/local/sbin/os-debug/datelog~'
'os-debug/dead-thttpd~' -> '/home/local/sbin/os-debug/dead-thttpd~'
'os-debug/thttpd_wrapper' -> '/home/local/sbin/os-debug/thttpd_wrapper'
'os-debug/datelog' -> '/home/local/sbin/os-debug/datelog'
'os-debug/thttpd_wrapper~' -> '/home/local/sbin/os-debug/thttpd_wrapper~'
frank@raspberrypi:~/freedom $ 



frank@raspberrypi:~/freedom $ cd /home/local/sbin/thttpd-extras     ### 1935
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


frank@raspberrypi:/home/local/sbin/thttpd-extras $ ls -al     ### 1939
total 80
drwxr-xr-x 3 frank frank 4096 Jul  7 12:03 .
drwxr-xr-x 4 root  root  4096 Jul  7 17:21 ..
-r--r--r-- 1 frank frank  533 Jan  8  2020 anvil_thttpd.gif
-rw-r--r-- 1 frank frank  533 Jan  8  2020 favicon.ico
-rwxr-xr-- 1 frank frank  485 Aug 31  2021 rc.local
-r-xr-xr-- 1 frank frank  485 Aug 31  2021 rc.local~
-rw-r--r-- 1 frank frank  308 Aug 13  2021 readme.txt
-r--r--r-- 1 frank frank   73 Jan  8  2020 robots-site.txt
-rw-r--r-- 1 frank frank   27 Jan  8  2020 robots.txt
-rw-r--r-- 1 frank frank  186 Jan  8  2020 sitemap.xml
-r--r--r-- 1 frank frank  186 Jan  8  2020 sitemap.xml.txt
-rwxr-xr-- 1 frank frank  501 Jun  7 16:20 thttpd_config
-r-xr-xr-- 1 frank frank  501 Jun  7 16:20 thttpd_config~
-rwxr-xr-- 1 frank frank 1746 Aug 31  2021 thttpd-rotate
-r-xr-xr-- 1 frank frank 1746 Aug 31  2021 thttpd-rotate~
-rwxr-xr-- 1 frank frank  136 Apr 22 17:00 thttpd.sh
-r-xr-xr-- 1 frank frank  136 Apr 22 17:02 thttpd.sh~
-rwxr-xr-- 1 frank frank  122 Aug 31  2021 thttpd_wrapper
-r-xr-xr-- 1 frank frank  122 Aug 31  2021 thttpd_wrapper~
drwxr-xr-x 4 frank frank 4096 Jul  7 12:03 vhost-DN-test
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat /etc/rc.local     ### 1965
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

exit 0
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat rc.local     ### 1990
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

# Start thttpd
echo "Starting thttpd. \n" 
   . /etc/thttpd.sh
#
exit 0
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo cp -av rc.local /etc/rc.local     ### sudo 2019
'rc.local' -> '/etc/rc.local'
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ ls -l /etc/rc.local     ### 2025
-rwxr-xr-- 1 frank frank 485 Aug 31  2021 /etc/rc.local
frank@raspberrypi:/home/local/sbin/thttpd-extras $ #     (rc.local is still 0754) 2027
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo cp -av thttpd.sh /etc/     ### sudo 2032
'thttpd.sh' -> '/etc/thttpd.sh'
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ ls -l /etc/thttpd.sh     ### 2038
-rwxr-xr-- 1 frank frank 136 Apr 22 17:00 /etc/thttpd.sh
frank@raspberrypi:/home/local/sbin/thttpd-extras $ #     (thttpd.sh is still 0754) 2040
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat thttpd.sh     ### 2045
#!/bin/sh
# thttpd.sh

if [ -x /home/local/sbin/thttpd_wrapper ] ; then
	echo " thttpd "
	/home/local/sbin/thttpd_wrapper &
fi
#
exit 0
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



### thttpd.sh is looking for thttpd_wrapper to be in "/home/local/sbin/" and being 0754, so we will copy "thttpd_wrapper" up one level to there




frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo cp -av thttpd_wrapper ../     ### sudo 2064
'thttpd_wrapper' -> '../thttpd_wrapper'
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


frank@raspberrypi:/home/local/sbin/thttpd-extras $ ls -l /home/local/sbin     ### 2069
total 168
-rwxr-xr-x 1 root  root   15296 Jul  7 16:44 htpasswd
-rwxr-sr-x 1 root  www    14504 Jul  7 16:44 makeweb
drwxr-xr-x 2 frank frank   4096 Jul  7 12:03 os-debug
-r-xr-xr-x 1 root  root    2878 Jul  7 16:44 syslogtocern
-r-xr-xr-x 1 bin   bin   121272 Jul  7 16:44 thttpd
drwxr-xr-x 3 frank frank   4096 Jul  7 12:03 thttpd-extras
-rwxr-xr-- 1 frank frank    122 Aug 31  2021 thttpd_wrapper
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



### The purpose of the file "thttpd_wrapper" is to restart "thttpd" if it stops, and it checks every 10 seconds to see if "/home/local/sbin/thttpd" is running and it also loads the configuration file that is: "/home/local/www/thttpd_config". If one changes the config file, one only has to kill the "thttpd pid number" and the wrapper will restart it in 10 seconds with the new configuration. "sudo kill xxxx" will kill a program. To get all of the running "pid" numbers use "ps -e". If you forget to use "sudo" to manually start "thttpd" or even "rc.local" every 10 seconds you will get a message that "/home/local/www/logs/thttpd_log" can not be written to! (because it is now owned by nobody). What appears on your screen is not what you type in, but both the error message and what you type in. Type in "ps -e" and look for the number for "thttpd_wrapper" and then type in "sudo kill xxxx" with "xxxx" being the "pid" number. Been there, done that way too many times!




frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat thttpd_wrapper     ### 2087
#!/bin/sh
# thttpd_wrapper

while true ; do
	/home/local/sbin/thttpd -D -C /home/local/www/thttpd_config
	sleep 10
done
#
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



# Next "thttpd-rotate" needs to be moved to "/etc/cron.daily/" so our log files get moved every day. The time they get rotated is in "/etc/crontab"




frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat /etc/crontab     ### 2105
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
 17  *	*  *  *	root    cd / && run-parts --report /etc/cron.hourly
 25  6	*  *  *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
 47  6	*  *  7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
 52  6	1  *  *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
frank@raspberrypi:/home/local/sbin/thttpd-extras $


 
frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo cp -av thttpd-rotate /etc/cron.daily/     ### sudo 2132
'thttpd-rotate' -> '/etc/cron.daily/thttpd-rotate'
frank@raspberrypi:/home/local/sbin/thttpd-extras $

 
frank@raspberrypi:/home/local/sbin/thttpd-extras $ ls -al /etc/cron.daily     ### 2137
total 32
drwxr-xr-x   2 root  root  4096 Jul  7 17:30 .
drwxr-xr-x 120 root  root  4096 Jul  7 17:26 ..
-rwxr-xr-x   1 root  root  1478 Jun 10  2021 apt-compat
-rwxr-xr-x   1 root  root  1298 Jan 29  2021 dpkg
-rwxr-xr-x   1 root  root   377 Feb 28  2021 logrotate
-rwxr-xr-x   1 root  root  1123 Feb 19  2021 man-db
-rw-r--r--   1 root  root   102 Feb 22  2021 .placeholder
-rwxr-xr--   1 frank frank 1746 Aug 31  2021 thttpd-rotate
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 
frank@raspberrypi:/home/local/sbin/thttpd-extras $ ###     (thttpd_rotate is still 0754) 2148
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


### The "thttpd_rotate" file I made is for 50 days so you don't have to move them every day, week, or even month. I also put a header and a tail on the files when they rotate so you have an idea how long your website has been up.



frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat thttpd-rotate     ### 2156
#!/bin/sh
# /etc/cron.daily/thttpd-rotate

cd /home/local/www/logs
rm -f thttpd_log.50

mv thttpd_log.49 thttpd_log.50
mv thttpd_log.48 thttpd_log.49
mv thttpd_log.47 thttpd_log.48
mv thttpd_log.46 thttpd_log.47
mv thttpd_log.45 thttpd_log.46
mv thttpd_log.44 thttpd_log.45
mv thttpd_log.43 thttpd_log.44
mv thttpd_log.42 thttpd_log.43
mv thttpd_log.41 thttpd_log.42
mv thttpd_log.40 thttpd_log.41
mv thttpd_log.39 thttpd_log.40
mv thttpd_log.38 thttpd_log.39
mv thttpd_log.37 thttpd_log.38
mv thttpd_log.36 thttpd_log.37
mv thttpd_log.35 thttpd_log.36
mv thttpd_log.34 thttpd_log.35
mv thttpd_log.33 thttpd_log.34
mv thttpd_log.32 thttpd_log.33
mv thttpd_log.31 thttpd_log.32
mv thttpd_log.30 thttpd_log.31
mv thttpd_log.29 thttpd_log.30
mv thttpd_log.28 thttpd_log.29
mv thttpd_log.27 thttpd_log.28
mv thttpd_log.26 thttpd_log.27
mv thttpd_log.25 thttpd_log.26
mv thttpd_log.24 thttpd_log.25
mv thttpd_log.23 thttpd_log.24
mv thttpd_log.22 thttpd_log.23
mv thttpd_log.21 thttpd_log.22
mv thttpd_log.20 thttpd_log.21
mv thttpd_log.19 thttpd_log.20
mv thttpd_log.18 thttpd_log.19
mv thttpd_log.17 thttpd_log.18
mv thttpd_log.16 thttpd_log.17
mv thttpd_log.15 thttpd_log.16
mv thttpd_log.14 thttpd_log.15
mv thttpd_log.13 thttpd_log.14
mv thttpd_log.12 thttpd_log.13
mv thttpd_log.11 thttpd_log.12
mv thttpd_log.10 thttpd_log.11
mv thttpd_log.09 thttpd_log.10
mv thttpd_log.08 thttpd_log.09
mv thttpd_log.07 thttpd_log.08
mv thttpd_log.06 thttpd_log.07
mv thttpd_log.05 thttpd_log.06
mv thttpd_log.04 thttpd_log.05
mv thttpd_log.03 thttpd_log.04
mv thttpd_log.02 thttpd_log.03
mv thttpd_log.01 thttpd_log.02

date >> thttpd_log
w >> thttpd_log

mv thttpd_log thttpd_log.01

date > thttpd_log
w >> thttpd_log
kill -usr1 `cat /var/run/thttpd.pid`
#
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 




# *********


### To copy the log files to dates, I: 
### cd /home/local/www/logs/     ### and then type: 
### ls -al     ### to get a listing of the files and the dates for the files. Then to copy the files: 
### "sudo cp -iav *log.xx 2020.01.01" with xx being the log number and then year.mo.da and then check that I have everything right before I press the enter key. Since the log files belong to nobody and nogroup, one has to use "sudo" and "cp -iav" so root can then change the owner to something else.

### Example:

#    sudo cp -iv *log.xx year.mo.da     ### (one can use ? to replace one character, or * to replace the rest of the string for all matching files).
#    ls -al

#    sudo chown -v a0:www year.mo.da     ### the owner:group changes from root:root to a0:www
#    ls -al     ### (lists the files and shows that they are "a0 www")
#    su a0     ### (Shell to user "a0" at this point you are still at: "/home/local/www/logs/")

#    cp -iav year.mo.da ~/logs/     ### which will copy the files into the /a0/logs/ file and then,
#    cp -iav year.mo.da ~/public_html/logs/     ### which will copy the files into the /home/local/www/users/a0/logs/ file, making them live on the www. They will be under "a0/logs/". Then I usually look on my Android phone and see if they are there. One has to refresh the page to get the new files to show.
#    exit     ### this returns you back to (pi).


# *********



### The last files to copy will be the "thttpd_config" files which go to "/home/local/www/".




frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo cp -av thttpd_config* /home/local/www/     ### sudo 2258
'thttpd_config' -> '/home/local/www/thttpd_config'
'thttpd_config~' -> '/home/local/www/thttpd_config~'
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


frank@raspberrypi:/home/local/sbin/thttpd-extras $ ls -al /home/local/www/     ### 2264
total 28
drwxr-xr-x 5 root  www   4096 Jul  7 17:33 .
drwxr-xr-x 5 root  root  4096 Jul  7 16:44 ..
drwxr-xr-x 2 root  www   4096 Jul  7 16:44 cgi-bin
drwxr-xr-x 2 root  www   4096 Jul  7 16:47 logs
-rwxr-xr-- 1 frank frank  501 Jun  7 16:20 thttpd_config
-r-xr-xr-- 1 frank frank  501 Jun  7 16:20 thttpd_config~
drwxrwxr-x 3 root  www   4096 Jul  7 16:55 users
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat thttpd_config     ### 2277
# /home/local/www/thttpd_config

dir=/home/local/www
chroot		#chroot jail

data_dir=users

#vhost    # if you use a domain name you will have to uncomment (remove the # at the beginning) and then make a "user" directory using your external IPv4 address (xxx.xxx.xxx.xxx) and inside this directory make symbolic links back up to your other files in "users" (ln -rs ../"user-name"), see: "vhost-DN-test".

cgipat=**.cgi
logfile=/home/local/www/logs/thttpd_log
pidfile=/var/run/thttpd.pid
#
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


# *****************************
# *****************************



###       TESTING: 2300



frank@raspberrypi:/home/local/sbin/thttpd-extras $ date     ### 2304
Thu 07 Jul 2022 05:34:56 PM MDT
frank@raspberrypi:/home/local/sbin/thttpd-extras $

 
frank@raspberrypi:/home/local/sbin/thttpd-extras $ cd ../     ### 2309
frank@raspberrypi:/home/local/sbin $ 


# We need the line from thttpd_wrapper without the wrapper.



frank@raspberrypi:/home/local/sbin $ cat thttpd_wrapper     ### 2317
#!/bin/sh
# thttpd_wrapper

while true ; do
	/home/local/sbin/thttpd -D -C /home/local/www/thttpd_config
	sleep 10
done
#
frank@raspberrypi:/home/local/sbin $



# ***** Start a new terminal here! ****** ###     2330



frank@raspberrypi:/home/local/sbin $ cd      ### We are changing to pi home and will need to start a new terminal since it is going to lock up as soon as thttpd starts.     2334
frank@raspberrypi:~ $ 


### ***** On a new terminal *****


frank@raspberrypi:~ $ # sudo /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config     ### copy the line without the first # and paste it on to the command prompt in a new terminal window, as it will lock up when thttpd starts running. 2341


frank@raspberrypi:~ $ date     ### 2344
Thu 07 Jul 2022 05:38:32 PM MDT
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ sudo /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config     ### sudo *** Terminal will lock up ***  2351
# At this point the new terminal will be locked up!     2352
### On the busy terminal, Control C or Control X won't stop the program. The only way to stop it is by going to a different terminal and find "thttpd" in "ps -e" then "sudo kill (program number), in this case it was xxxx for sudo, and xxxx for thttpd.     2353


frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ 


# *********************


frank@raspberrypi:~ $ # Back on Geany terminal:


#    Hopefully you installed ELinks! If you did, in the "geany" terminal type: elinks http://localhost/     ### If you just use "localhost" it will try to find a file by that name. When one gets to using the IP Address one can just use the IP Address, "elinks 192.168.1.125" or whatever your IP Address is. "Esc" should bring up the help line at the top of the page, left arrow back one page, right arrow forward one page, and "q" should ask to quit elinks, or just do a "control-c". One should be able to click on the "master user" and have it go into that directory, and then click on (../) the two dots and a slash and go back one level.

### On your web browser, see if a green screen comes up with your first web entry. Click on it to see if it will open. Then click on the (../) to see if it takes you back up one level.

#    On some html pages they showed up as dark blue with dark gray text on a black screen which I really could not read so under "Setup" and then the "Terminal Options" I changed from "VT 100 frames" to "Linux frames with fbterm colors" and then those black pages were readable as "black text on white"!

# *********************



frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ elinks http://localhost/     ### 2377

    File    View    Link    Tools    Setup    Help                                                                                        
Index of /                                                                                                                                
                                                                                                                                          
 mode  links    bytes  last-changed  name                                                                                                 
                                                                                                                                          
                                                                                                                                          
   ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────   
                                                                                                                                          
 dr-x   3        4096  Jul  7 22:55  ./                                                                                                   
 dr-x   5        4096  Jul  7 23:33  ../                                                                                                  
 dr-x   2        4096  Jul  7 22:55  a0/                                                                                                  
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          
http://localhost/                                                                                                                         





frank@raspberrypi:~ $ 

### Everything should be working at this point. Test one OK.
frank@AC0XL-Raspberry-Pi-2B-1-1:/home/local/sbin $ 



# ### On this terminal (in Geany), type: ps -e    # to find the "PID"s so you can "kill" the processes after you do a test to see if entering "localhost" in your web browser brings up a green page with your web user.



frank@raspberrypi:~ $ ps -e     ### 2428
    PID TTY          TIME CMD
      1 ?        00:00:03 systemd
      2 ?        00:00:00 kthreadd
      3 ?        00:00:00 rcu_gp
      4 ?        00:00:00 rcu_par_gp
      8 ?        00:00:00 mm_percpu_wq
      9 ?        00:00:00 rcu_tasks_kthre
     10 ?        00:00:00 rcu_tasks_rude_
     11 ?        00:00:00 rcu_tasks_trace
     12 ?        00:00:00 ksoftirqd/0
     13 ?        00:00:06 rcu_preempt
     14 ?        00:00:00 migration/0
     15 ?        00:00:00 cpuhp/0
     16 ?        00:00:00 cpuhp/1
     17 ?        00:00:00 migration/1
     18 ?        00:00:00 ksoftirqd/1
     21 ?        00:00:00 cpuhp/2
     22 ?        00:00:00 migration/2
     23 ?        00:00:00 ksoftirqd/2
     26 ?        00:00:00 cpuhp/3
     27 ?        00:00:00 migration/3
     28 ?        00:00:00 ksoftirqd/3
     31 ?        00:00:00 kdevtmpfs
     32 ?        00:00:00 netns
     33 ?        00:00:00 inet_frag_wq
     36 ?        00:00:02 kworker/2:1-mm_percpu_wq
     38 ?        00:00:00 kauditd
     40 ?        00:00:00 khungtaskd
     41 ?        00:00:00 oom_reaper
     42 ?        00:00:00 writeback
     43 ?        00:00:00 kcompactd0
     63 ?        00:00:00 kblockd
     64 ?        00:00:00 blkcg_punt_bio
     65 ?        00:00:00 watchdogd
     67 ?        00:00:00 kworker/0:1H-mmc_complete
     68 ?        00:00:00 rpciod
     69 ?        00:00:01 kworker/u9:0-brcmf_wq/mmc1:0001:1
     70 ?        00:00:00 xprtiod
     72 ?        00:00:00 kswapd0
     73 ?        00:00:00 nfsiod
     74 ?        00:00:00 kthrotld
     75 ?        00:00:00 iscsi_eh
     76 ?        00:00:00 iscsi_conn_clea
     77 ?        00:00:00 nvme-wq
     78 ?        00:00:00 nvme-reset-wq
     79 ?        00:00:00 nvme-delete-wq
     81 ?        00:00:00 DWC Notificatio
     82 ?        00:00:00 uas
     83 ?        00:00:00 vchiq-slot/0
     84 ?        00:00:00 vchiq-recy/0
     85 ?        00:00:00 vchiq-sync/0
     86 ?        00:00:00 zswap-shrink
     87 ?        00:00:00 sdhci
     88 ?        00:00:00 irq/47-mmc0
     91 ?        00:00:00 mmc_complete
     92 ?        00:00:00 kworker/3:1H-kblockd
     93 ?        00:00:00 kworker/1:1H-kblockd
     94 ?        00:00:00 jbd2/mmcblk0p2-
     95 ?        00:00:00 ext4-rsv-conver
     99 ?        00:00:00 kworker/2:2H-kblockd
    100 ?        00:00:00 mld
    101 ?        00:00:00 ipv6_addrconf
    145 ?        00:00:01 systemd-journal
    152 ?        00:00:02 kworker/2:3-mm_percpu_wq
    167 ?        00:00:01 systemd-udevd
    200 ?        00:00:00 vchiq-keep/0
    201 ?        00:00:00 SMIO
    219 ?        00:00:00 mmal-vchiq
    220 ?        00:00:00 mmal-vchiq
    222 ?        00:00:00 mmal-vchiq
    224 ?        00:00:00 mmal-vchiq
    228 ?        00:00:16 v3d_bin
    229 ?        00:00:17 v3d_render
    230 ?        00:00:00 v3d_tfu
    231 ?        00:00:00 v3d_csd
    232 ?        00:00:00 v3d_cache_clean
    234 ?        00:00:00 mmal-vchiq
    239 ?        00:00:00 mmal-vchiq
    247 ?        00:00:00 mmal-vchiq
    281 ?        00:00:00 cfg80211
    312 ?        00:00:00 brcmf_wq/mmc1:0
    316 ?        00:00:00 brcmf_wdog/mmc1
    395 ?        00:00:00 irq/38-vc4 hdmi
    396 ?        00:00:00 irq/39-vc4 hdmi
    397 ?        00:00:00 cec-vc4
    398 ?        00:00:00 irq/35-vc4 hdmi
    400 ?        00:00:00 irq/34-vc4 hdmi
    401 ?        00:00:00 irq/44-vc4 hdmi
    403 ?        00:00:00 irq/45-vc4 hdmi
    404 ?        00:00:00 cec-vc4
    405 ?        00:00:00 irq/41-vc4 hdmi
    406 ?        00:00:00 irq/40-vc4 hdmi
    408 ?        00:00:00 card1-crtc0
    409 ?        00:00:00 card1-crtc1
    410 ?        00:00:00 card1-crtc2
    411 ?        00:00:00 card1-crtc3
    412 ?        00:00:00 card1-crtc4
    413 ?        00:00:00 card1-crtc5
    420 ?        00:00:00 avahi-daemon
    422 ?        00:00:00 cron
    423 ?        00:00:00 avahi-daemon
    426 ?        00:00:00 dbus-daemon
    465 ?        00:00:00 polkitd
    497 ?        00:00:00 rsyslogd
    500 ?        00:00:00 systemd-logind
    505 ?        00:00:06 thd
    507 ?        00:00:00 udisksd
    509 ?        00:00:00 wpa_supplicant
    539 ?        00:00:00 ModemManager
    553 ?        00:00:00 rngd
    558 ?        00:00:00 cupsd
    571 ?        00:00:00 lightdm
    573 ?        00:00:00 dhcpcd
    607 tty7     00:04:31 Xorg
    608 tty1     00:00:00 login
    610 ?        00:00:00 cups-browsed
    633 ?        00:00:00 wpa_supplicant
    769 ?        00:00:00 lightdm
    774 ?        00:00:00 systemd
    775 ?        00:00:00 (sd-pam)
    789 ?        00:00:00 pipewire
    790 ?        00:00:01 pulseaudio
    791 ?        00:00:00 lxsession
    802 ?        00:00:00 dbus-daemon
    803 ?        00:00:00 rtkit-daemon
    811 ?        00:00:00 pipewire-media-
    848 ?        00:00:00 ssh-agent
    876 ?        00:00:00 gvfsd
    879 tty1     00:00:00 bash
    890 ?        00:00:00 gvfsd-fuse
    906 ?        00:02:11 mutter
    908 ?        00:00:00 lxpolkit
    911 ?        00:01:50 lxpanel
    912 ?        00:00:04 pcmanfm
    925 ?        00:00:00 applet.py
    926 ?        00:00:00 ssh-agent
    954 ?        00:00:00 hciattach
    957 ?        00:00:00 kworker/u9:2-hci0
    962 ?        00:00:00 bluetoothd
    981 ?        00:00:00 krfcommd
   1010 ?        00:00:00 menu-cached
   1015 ?        00:00:00 gvfs-udisks2-vo
   1023 ?        00:00:00 gvfs-afc-volume
   1028 ?        00:00:00 gvfs-gphoto2-vo
   1032 ?        00:00:00 gvfs-mtp-volume
   1036 ?        00:00:00 gvfs-goa-volume
   1041 ?        00:00:00 gvfsd-trash
   1256 ?        00:00:00 systemd-timesyn
   1258 ?        00:01:49 geany
   1266 pts/0    00:00:00 bash
   1279 ?        00:00:05 packagekitd
   2664 ?        00:00:07 lxterminal
   2670 pts/1    00:00:00 bash
   2699 ?        00:00:00 gvfsd-metadata
   2730 ?        00:00:26 mousepad
   2739 ?        00:00:00 xfconfd
   2746 ?        00:00:00 dconf-service
   2760 ?        00:00:00 gvfsd-network
   2766 ?        00:00:00 gvfsd-smb-brows
   2774 ?        00:00:00 gvfsd-dnssd
   2897 ?        00:00:00 kworker/1:2H
   3454 ?        00:00:01 kworker/u8:1-events_unbound
   3464 ?        00:00:29 pluma
   3544 ?        00:00:00 kworker/3:3-events_freezable
   3545 ?        00:00:00 kworker/1:1-mm_percpu_wq
   3565 ?        00:00:00 kworker/0:2H
   3584 ?        00:00:00 kworker/0:0-events
   3586 ?        00:00:00 kworker/3:0-mm_percpu_wq
   3589 ?        00:00:00 kworker/3:2H
   3591 ?        00:00:00 kworker/u8:2-events_unbound
   3592 ?        00:00:01 kworker/u8:3-events_unbound
   3605 pts/0    00:00:00 sudo
   3606 ?        00:00:05 thttpd
   3607 ?        00:00:00 kworker/2:1H
   3608 ?        00:00:00 kworker/3:1-mm_percpu_wq
   3609 ?        00:00:00 kworker/2:2-mm_percpu_wq
   3616 ?        00:00:00 kworker/0:2-events_power_efficient
   3617 ?        00:00:00 kworker/1:2-events
   3621 ?        00:00:00 kworker/3:2-mm_percpu_wq
   3622 ?        00:00:00 kworker/0:1-events
   3628 ?        00:00:00 kworker/1:0-events
   3629 ?        00:00:00 kworker/2:0-mm_percpu_wq
   3630 pts/1    00:00:00 ps


### On the busy terminal, Control C or Control X won't stop the program. The only way to stop it is by going to a different terminal and find "thttpd" in "ps -e" then "sudo kill (program number), in this case it was 3605 for sudo, and 3606 for thttpd.



frank@raspberrypi:~ $ ps p 3605 3606
    PID TTY      STAT   TIME COMMAND
   3605 pts/0    S+     0:00 sudo /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config
   3606 ?        Ss     0:05 /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ sudo kill 3605 3606
frank@raspberrypi:~ $ sudo kill 3605 3606
kill: (3605): No such process
kill: (3606): No such process
frank@raspberrypi:~ $ 


### Now you can look at your log file in: /home/local/www/logs/


frank@raspberrypi:~ $ date     ### 2636
Thu 07 Jul 2022 05:55:27 PM MDT
frank@raspberrypi:~ $ 


frank@raspberrypi:~ $ cd /home/local/www/logs     ### 2641
frank@raspberrypi:/home/local/www/logs $ 
frank@raspberrypi:/home/local/www/logs $ 


frank@raspberrypi:/home/local/www/logs $ ls -al     ### 2646
total 12
drwxr-xr-x 2 root   www     4096 Jul  7 17:41 .
drwxr-xr-x 5 root   www     4096 Jul  7 17:33 ..
-rw-r--r-- 1 nobody nogroup  282 Jul  7 17:42 thttpd_log


frank@raspberrypi:/home/local/www/logs $ cat *log     ### 2653
::1 - - [07/Jul/2022:23:42:42 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
::1 - - [07/Jul/2022:23:42:47 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
frank@raspberrypi:/home/local/www/logs $ 


frank@raspberrypi:/home/local/www/logs $ ### The program thttpd is working OK. 2659
frank@raspberrypi:/home/local/www/logs $ 



### Now we need to add the files to "users" that are in "/home/local/sbin/thttpd-extras".



frank@raspberrypi:/home/local/www/logs $ cd /home/local/sbin/thttpd-extras/     ### 2668
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


frank@raspberrypi:/home/local/sbin/thttpd-extras $ ls -al     ### 2672
total 80
drwxr-xr-x 3 frank frank 4096 Jul  7 12:03 .
drwxr-xr-x 4 root  root  4096 Jul  7 17:28 ..
-r--r--r-- 1 frank frank  533 Jan  8  2020 anvil_thttpd.gif
-rw-r--r-- 1 frank frank  533 Jan  8  2020 favicon.ico
-rwxr-xr-- 1 frank frank  485 Aug 31  2021 rc.local
-r-xr-xr-- 1 frank frank  485 Aug 31  2021 rc.local~
-rw-r--r-- 1 frank frank  308 Aug 13  2021 readme.txt
-r--r--r-- 1 frank frank   73 Jan  8  2020 robots-site.txt
-rw-r--r-- 1 frank frank   27 Jan  8  2020 robots.txt
-rw-r--r-- 1 frank frank  186 Jan  8  2020 sitemap.xml
-r--r--r-- 1 frank frank  186 Jan  8  2020 sitemap.xml.txt
-rwxr-xr-- 1 frank frank  501 Jun  7 16:20 thttpd_config
-r-xr-xr-- 1 frank frank  501 Jun  7 16:20 thttpd_config~
-rwxr-xr-- 1 frank frank 1746 Aug 31  2021 thttpd-rotate
-r-xr-xr-- 1 frank frank 1746 Aug 31  2021 thttpd-rotate~
-rwxr-xr-- 1 frank frank  136 Apr 22 17:00 thttpd.sh
-r-xr-xr-- 1 frank frank  136 Apr 22 17:02 thttpd.sh~
-rwxr-xr-- 1 frank frank  122 Aug 31  2021 thttpd_wrapper
-r-xr-xr-- 1 frank frank  122 Aug 31  2021 thttpd_wrapper~
drwxr-xr-x 4 frank frank 4096 Jul  7 12:03 vhost-DN-test
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo cp -iav favicon.ico /home/local/www/users/     ### sudo 2698
'favicon.ico' -> '/home/local/www/users/favicon.ico'
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo cp -iav readme.txt /home/local/www/users/     ### sudo 2703
'readme.txt' -> '/home/local/www/users/readme.txt'
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo cp -iav robots.txt /home/local/www/users/     ### sudo 2708
'robots.txt' -> '/home/local/www/users/robots.txt'
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 


frank@raspberrypi:/home/local/sbin/thttpd-extras $ sudo ls -al /home/local/www/users/     ### sudo 2713
total 24
drwxrwxr-x 3 root  www   4096 Jul  7 17:59 .
drwxr-xr-x 5 root  www   4096 Jul  7 17:33 ..
drwxr-xr-x 2 a0    www   4096 Jul  7 16:55 a0
-rw-r--r-- 1 frank frank  533 Jan  8  2020 favicon.ico
-rw-r--r-- 1 frank frank  308 Aug 13  2021 readme.txt
-rw-r--r-- 1 frank frank   27 Jan  8  2020 robots.txt


frank@raspberrypi:/home/local/sbin/thttpd-extras $ date     ### 2723
Thu 07 Jul 2022 06:00:16 PM MDT
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat robots-site.txt     ### 2729
User-agent: *
Disallow: 
Sitemap: http://xxx.xxx.xxx.xxx/sitemap.xml/
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



frank@raspberrypi:/home/local/sbin/thttpd-extras $ cat sitemap.xml     ### 2737
<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

   <url>

      <loc>http://xxx.xxx.xxx.xxx/</loc>

   </url>

</urlset>
frank@raspberrypi:/home/local/sbin/thttpd-extras $ 



### You would use "robots-site.txt" replacing the XXX.xxx.xxx.xxx with your external static IPv4 address and then naming it "robots.txt". Likewise, with the "sitemap.xml" file and keep the same name for it. Adding both of these files to “/home/local/www/users/”, if you have an external static IP address

# *******************



frank@raspberrypi:/home/local/sbin/thttpd-extras $ cd /etc     ### 2759
frank@raspberrypi:/etc $ 

### **** If you don't use sudo here it will start looping every 10 seconds. Then you would have to find the PID number for thttpd_wrapper and sudo kill "pid-number" because it is trying to write to root files!!!, or just turn off the computer. ****


frank@raspberrypi:/etc $ date     ### 2765
Thu 07 Jul 2022 06:02:02 PM MDT
frank@raspberrypi:/etc $ 



frank@raspberrypi:/etc $ sudo ./rc.local   ### sudo (Starting thttpd from rc.local, REMEMBER the sudo!!!!!!) 2771
My IP address is 192.168.1.187 192.168.1.86 
Starting thttpd. 

 thttpd 
frank@raspberrypi:/etc $ # on the line above, (Notice the thttpd above the "frank@raspberrypi:/etc" on the terminal screen, it is still running.)

# Here we see that my local IP Address is 192.168.1.187 and 192.168.1.86 and thttpd has started and is now running. so we will see if these IP Addresses will get to my web site.




frank@raspberrypi:/etc $ elinks 192.168.1.187     ### 2783

                                                                                                      http://192.168.1.187/robots.txt 
User-agent: *                                                                                                                         
Disallow:                                                                                                                             
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      
OK                                                                                                                                    












frank@raspberrypi:/etc $ elinks 192.168.1.86     ### 2783

                                                                                                                     Index of / (2/2) 
                                                                                                                                      
                                                                                                                                      
   ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────   
                                                                                                                                      
 dr-x   3        4096  Jul  7 23:59  ./                                                                                               
 dr-x   5        4096  Jul  7 23:33  ../                                                                                              
 dr-x   2        4096  Jul  7 22:55  a0/                                                                                              
 -r--   1         533  Jan  9  2020  favicon.ico                                                                                      
 -r--   1         308  Aug 14  2021  readme.txt                                                                                       
 -r--   1          27  Jan  9  2020  robots.txt                                                                                       
                                                                                                                                      
http://192.168.1.86/a0/                                                                                                               












frank@raspberrypi:/etc $ 


 
frank@raspberrypi:/etc $ cat /home/local/www/logs/*log     ### 2841
::1 - - [07/Jul/2022:23:42:42 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
::1 - - [07/Jul/2022:23:42:47 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
192.168.1.187 - - [08/Jul/2022:00:03:47 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:18 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:25 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:31 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:41 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:05:39 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:05:45 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:03 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:13 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:20 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
frank@raspberrypi:/etc $ 
frank@raspberrypi:/etc $ 



### At this point I want to do a log rotate and check it out.



frank@raspberrypi:/etc $ cd cron.daily     ###  2863
frank@raspberrypi:/etc/cron.daily $

 
frank@raspberrypi:/etc/cron.daily $ ls -al     ### 2867
total 32
drwxr-xr-x   2 root  root  4096 Jul  7 17:30 .
drwxr-xr-x 120 root  root  4096 Jul  7 17:26 ..
-rwxr-xr-x   1 root  root  1478 Jun 10  2021 apt-compat
-rwxr-xr-x   1 root  root  1298 Jan 29  2021 dpkg
-rwxr-xr-x   1 root  root   377 Feb 28  2021 logrotate
-rwxr-xr-x   1 root  root  1123 Feb 19  2021 man-db
-rw-r--r--   1 root  root   102 Feb 22  2021 .placeholder
-rwxr-xr--   1 frank frank 1746 Aug 31  2021 thttpd-rotate
frank@raspberrypi:/etc/cron.daily $ 


### One has to use sudo because they are owned by root. The period "." stands for "do" then it needs a space, hence the "/".



frank@raspberrypi:/etc/cron.daily $ sudo ./thttpd-rotate     ### # These files do not exist yet because we do not have 50 log files. 2884
mv: cannot stat 'thttpd_log.49': No such file or directory
mv: cannot stat 'thttpd_log.48': No such file or directory
mv: cannot stat 'thttpd_log.47': No such file or directory
mv: cannot stat 'thttpd_log.46': No such file or directory
mv: cannot stat 'thttpd_log.45': No such file or directory
mv: cannot stat 'thttpd_log.44': No such file or directory
mv: cannot stat 'thttpd_log.43': No such file or directory
mv: cannot stat 'thttpd_log.42': No such file or directory
mv: cannot stat 'thttpd_log.41': No such file or directory
mv: cannot stat 'thttpd_log.40': No such file or directory
mv: cannot stat 'thttpd_log.39': No such file or directory
mv: cannot stat 'thttpd_log.38': No such file or directory
mv: cannot stat 'thttpd_log.37': No such file or directory
mv: cannot stat 'thttpd_log.36': No such file or directory
mv: cannot stat 'thttpd_log.35': No such file or directory
mv: cannot stat 'thttpd_log.34': No such file or directory
mv: cannot stat 'thttpd_log.33': No such file or directory
mv: cannot stat 'thttpd_log.32': No such file or directory
mv: cannot stat 'thttpd_log.31': No such file or directory
mv: cannot stat 'thttpd_log.30': No such file or directory
mv: cannot stat 'thttpd_log.29': No such file or directory
mv: cannot stat 'thttpd_log.28': No such file or directory
mv: cannot stat 'thttpd_log.27': No such file or directory
mv: cannot stat 'thttpd_log.26': No such file or directory
mv: cannot stat 'thttpd_log.25': No such file or directory
mv: cannot stat 'thttpd_log.24': No such file or directory
mv: cannot stat 'thttpd_log.23': No such file or directory
mv: cannot stat 'thttpd_log.22': No such file or directory
mv: cannot stat 'thttpd_log.21': No such file or directory
mv: cannot stat 'thttpd_log.20': No such file or directory
mv: cannot stat 'thttpd_log.19': No such file or directory
mv: cannot stat 'thttpd_log.18': No such file or directory
mv: cannot stat 'thttpd_log.17': No such file or directory
mv: cannot stat 'thttpd_log.16': No such file or directory
mv: cannot stat 'thttpd_log.15': No such file or directory
mv: cannot stat 'thttpd_log.14': No such file or directory
mv: cannot stat 'thttpd_log.13': No such file or directory
mv: cannot stat 'thttpd_log.12': No such file or directory
mv: cannot stat 'thttpd_log.11': No such file or directory
mv: cannot stat 'thttpd_log.10': No such file or directory
mv: cannot stat 'thttpd_log.09': No such file or directory
mv: cannot stat 'thttpd_log.08': No such file or directory
mv: cannot stat 'thttpd_log.07': No such file or directory
mv: cannot stat 'thttpd_log.06': No such file or directory
mv: cannot stat 'thttpd_log.05': No such file or directory
mv: cannot stat 'thttpd_log.04': No such file or directory
mv: cannot stat 'thttpd_log.03': No such file or directory
mv: cannot stat 'thttpd_log.02': No such file or directory
mv: cannot stat 'thttpd_log.01': No such file or directory
frank@raspberrypi:/etc/cron.daily $ 
frank@raspberrypi:/etc/cron.daily $ 



frank@raspberrypi:/etc/cron.daily $ cat /home/local/www/logs/*log     ### 2939
Thu 07 Jul 2022 06:09:09 PM MDT
 18:09:09 up  2:03,  2 users,  load average: 0.37, 0.26, 0.20
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:04m  5:24   0.59s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:04m  0.06s  0.05s -bash
frank@raspberrypi:/etc/cron.daily $ 



frank@raspberrypi:/etc/cron.daily $ cat /home/local/www/logs/*log.01     ### 2949
::1 - - [07/Jul/2022:23:42:42 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
::1 - - [07/Jul/2022:23:42:47 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
192.168.1.187 - - [08/Jul/2022:00:03:47 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:18 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:25 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:31 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:41 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:05:39 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:05:45 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:03 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:13 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:20 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
Thu 07 Jul 2022 06:09:09 PM MDT
 18:09:09 up  2:03,  2 users,  load average: 0.37, 0.26, 0.20
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:04m  5:24   0.59s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:04m  0.06s  0.05s -bash
frank@raspberrypi:/etc/cron.daily $ 



frank@raspberrypi:/etc/cron.daily $ cd      ### Change to (frank) home.     2971
frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ man makeweb     ### 2973

frank@raspberrypi:~ $ man htpasswd     ### 2975

frank@raspberrypi:~ $ man syslogtocern     ### 2977

frank@raspberrypi:~ $ man thttpd     ### 2979

frank@raspberrypi:~ $ man redirect     ### 2981

frank@raspberrypi:~ $ man ssi     ### 2983

frank@raspberrypi:~ $ man strftime     ### 2985

frank@raspberrypi:~ $ man weblog_parse     ### 2987
No manual entry for weblog_parse

frank@raspberrypi:~ $ man http_get     ### 2990
No manual entry for http_get



frank@raspberrypi:~ $ 
frank@raspberrypi:~ $ ### It looks like all of the man pages that come with thttpd are working. Some systems will not find the path to the man pages and those systems can use: sudo cp -iav /home/local/man/* /usr/local/man     # to copy them over into "/usr/local/man" (see below). 2996
frank@raspberrypi:~ $ 


# ************************************


pi@raspberrypi:/etc $ ### If the man pages did not work, this should let them work.
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ cd /home/local/man     ### 3006
pi@raspberrypi:/home/local/man $ 


pi@raspberrypi:/home/local/man $ ls -al     ### 3010
total 16
drwxr-xr-x 4 root root 4096 Mar 16 21:27 .
drwxr-xr-x 5 root root 4096 Mar 16 21:27 ..
drwxr-xr-x 2 root root 4096 Mar 16 21:27 man1
drwxr-xr-x 2 root root 4096 Mar 16 21:27 man8
pi@raspberrypi:/home/local/man $ 
pi@raspberrypi:/home/local/man $ 


pi@raspberrypi:/home/local/man $ sudo cp -iav /home/local/man/* /usr/local/man     ### sudo 3020
'/home/local/man/man1' -> '/usr/local/man/man1'
'/home/local/man/man1/makeweb.1' -> '/usr/local/man/man1/makeweb.1'
'/home/local/man/man1/htpasswd.1' -> '/usr/local/man/man1/htpasswd.1'
'/home/local/man/man8' -> '/usr/local/man/man8'
'/home/local/man/man8/thttpd.8' -> '/usr/local/man/man8/thttpd.8'
'/home/local/man/man8/redirect.8' -> '/usr/local/man/man8/redirect.8'
'/home/local/man/man8/ssi.8' -> '/usr/local/man/man8/ssi.8'
'/home/local/man/man8/syslogtocern.8' -> '/usr/local/man/man8/syslogtocern.8'
pi@raspberrypi:/home/local/man $ 
pi@raspberrypi:/home/local/man $ 


pi@raspberrypi:/home/local/man $ # Then test to see if the man pages work, as was done above.  3033
pi@raspberrypi:/home/local/man $ 
pi@raspberrypi:/home/local/man $ cd /etc     ### 3035
pi@raspberrypi:/etc $ 


###****************************


frank@AC0XL-Raspberry-Pi-2B-1-1:~ $ cd     ### 3042
frank@AC0XL-Raspberry-Pi-2B-1-1:~ $ 


frank@raspberrypi:~ $ date     ### 3046
Thu 07 Jul 2022 06:18:30 PM MDT
frank@raspberrypi:~ $ 


frank@raspberrypi:~ $ ###****************************make log entries using different machines or phones. 3051
frank@raspberrypi:~ $ 

### Since I was having problems with my setup I decided I needed more information in my logs to be able to see when I had to restart my 
computer, or when my power went down. I am on batteries and an inverter, and have other problems so I built the "os-debug" directory under /home/local/sbin/.



frank@raspberrypi:~ $ date     ### 3059
Thu 07 Jul 2022 06:36:16 PM MDT
frank@raspberrypi:~ $ 



### thttpd is still running and I am going to change and add the os-debug files and then you can see the difference they make to the log files. These are the log files before I change and add the files from "os-debug".



frank@raspberrypi:~ $ cd /home/local/www/logs     ### 3069
frank@raspberrypi:/home/local/www/logs $ 


frank@raspberrypi:/home/local/www/logs $ ls -al     ### 3073
total 16
drwxr-xr-x 2 root   www     4096 Jul  7 18:09 .
drwxr-xr-x 5 root   www     4096 Jul  7 17:33 ..
-rw-r--r-- 1 nobody nogroup 3710 Jul  7 18:35 thttpd_log
-rw-r--r-- 1 nobody nogroup 2239 Jul  7 18:09 thttpd_log.01
frank@raspberrypi:/home/local/www/logs $ 



frank@raspberrypi:/home/local/www/logs $ cat *log.01     ### 3083
::1 - - [07/Jul/2022:23:42:42 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
::1 - - [07/Jul/2022:23:42:47 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
192.168.1.187 - - [08/Jul/2022:00:03:47 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:18 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:25 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:31 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:41 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:05:39 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:05:45 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:03 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:13 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:20 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
Thu 07 Jul 2022 06:09:09 PM MDT
 18:09:09 up  2:03,  2 users,  load average: 0.37, 0.26, 0.20
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:04m  5:24   0.59s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:04m  0.06s  0.05s -bash
frank@raspberrypi:/home/local/www/logs $ 



frank@raspberrypi:/home/local/www/logs $ cat *log     ### 3105
Thu 07 Jul 2022 06:09:09 PM MDT
 18:09:09 up  2:03,  2 users,  load average: 0.37, 0.26, 0.20
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:04m  5:24   0.59s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:04m  0.06s  0.05s -bash
192.168.1.219 - - [08/Jul/2022:00:21:22 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:21:22 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.3.0) Gecko/68.3.0 Firefox/68.3.0"
192.168.1.219 - - [08/Jul/2022:00:21:35 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.187/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:21:49 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.187/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:21:54 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.187/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:25 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:26 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.3.0) Gecko/68.3.0 Firefox/68.3.0"
192.168.1.219 - - [08/Jul/2022:00:22:36 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.86/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:40 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.86/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:45 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.86/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:51 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.86/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.241 - - [08/Jul/2022:00:33:15 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:33:44 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.187/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:34:19 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.187/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:34:28 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.187/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:34:35 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.187/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:35:14 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:35:26 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.86/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:35:32 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.86/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:35:36 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.86/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
frank@raspberrypi:/home/local/www/logs $ 



### thttpd is still running and I am going to change and add the os-debug files and then you can see the difference they make to the log.




frank@raspberrypi:/home/local/www/logs $ cd /home/local/sbin/os-debug/     ### 3140
frank@raspberrypi:/home/local/sbin/os-debug $ 


### The files in os-debug have additional thttpd pid numbers to help with OS problems.


frank@raspberrypi:/home/local/sbin/os-debug $ ls -al     ### 3147
total 48
drwxr-xr-x 2 frank frank 4096 Jul  7 12:03 .
drwxr-xr-x 4 root  root  4096 Jul  7 17:28 ..
-rwxr-xr-- 1 frank frank  185 Aug 31  2021 datelog
-r-xr-xr-- 1 frank frank  185 Aug 31  2021 datelog~
-rwxr-xr-- 1 frank frank  385 Aug 31  2021 dead-thttpd
-r-xr-xr-- 1 frank frank  385 Aug 31  2021 dead-thttpd~
-r--r--r-- 1 frank frank  792 Apr 22 17:17 readme.txt
-r--r--r-- 1 frank frank  792 Apr 22 17:17 readme.txt~
-rwxr-xr-- 1 frank frank 1965 Aug 31  2021 thttpd-rotate
-r-xr-xr-- 1 frank frank 1965 Aug 31  2021 thttpd-rotate~
-rwxr-xr-- 1 frank frank  153 Aug 31  2021 thttpd_wrapper
-r-xr-xr-- 1 frank frank  153 Aug 31  2021 thttpd_wrapper~
frank@raspberrypi:/home/local/sbin/os-debug $ 



frank@raspberrypi:/home/local/sbin/os-debug $ cat readme.txt     ### 3165
#readme.txt
#
#    The files in os-debug have additional thttpd pid numbers to help with OS problems.
#
#pi@AC0XL-Pi-400:~$ 
#pi@AC0XL-Pi-400:~$ cd /home/local/sbin/os-debug/     ###
#pi@AC0XL-Pi-400:/home/local/sbin/os-debug $ 
#pi@AC0XL-Pi-400:/home/local/sbin/os-debug $ sudo cp -av d* thttp*r ../     ### sudo
#'datelog' -> '../datelog'
#'dead-thttpd' -> '../dead-thttpd'
#'thttpd_wrapper' -> '../thttpd_wrapper'
#pi@AC0XL-Pi-400:/home/local/sbin/os-debug $ 
#pi@AC0XL-Pi-400:/home/local/sbin/os-debug $ 
#
#    Now we have to replace thttpd-rotate in /etc/cron.daily.
#
#pi@AC0XL-Pi-400:/home/local/sbin/os-debug $ sudo cp -av thttpd-rotate /etc/cron.daily     ### sudo - we are adding lines for thttpd pid information.     
#pi@AC0XL-Pi-400:/home/local/sbin/os-debug $ 
#
frank@raspberrypi:/home/local/sbin/os-debug $ 



frank@raspberrypi:/home/local/sbin/os-debug $ sudo cp -av d* thttp*r ../     ### sudo 3189
'datelog' -> '../datelog'
'datelog~' -> '../datelog~'
'dead-thttpd' -> '../dead-thttpd'
'dead-thttpd~' -> '../dead-thttpd~'
'thttpd_wrapper' -> '../thttpd_wrapper'
frank@raspberrypi:/home/local/sbin/os-debug $ 



#    Now we have to replace thttpd-rotate in /etc/cron.daily.



frank@raspberrypi:/home/local/sbin/os-debug $ sudo cp -av thttpd-rotate /etc/cron.daily     ### sudo - we are adding lines for thttpd PID information. 3203
'thttpd-rotate' -> '/etc/cron.daily/thttpd-rotate'
frank@raspberrypi:/home/local/sbin/os-debug $ 


# *****************


frank@raspberrypi:/home/local/sbin/os-debug $ cat thttpd_wrapper     ### 3211
#!/bin/sh
# thttpd_wrapper

while true ; do
	/home/local/sbin/thttpd -D -C /home/local/www/thttpd_config
		/home/local/sbin/dead-thttpd
	sleep 10
done
#
frank@raspberrypi:/home/local/sbin/os-debug $




frank@raspberrypi:/home/local/sbin/os-debug $ cat thttpd-rotate     ### 3226
#!/bin/sh
# /etc/cron.daily/thttpd-rotate

cd /home/local/www/logs
rm -f thttpd_log.50

mv thttpd_log.49 thttpd_log.50
mv thttpd_log.48 thttpd_log.49
mv thttpd_log.47 thttpd_log.48
mv thttpd_log.46 thttpd_log.47
mv thttpd_log.45 thttpd_log.46
mv thttpd_log.44 thttpd_log.45
mv thttpd_log.43 thttpd_log.44
mv thttpd_log.42 thttpd_log.43
mv thttpd_log.41 thttpd_log.42
mv thttpd_log.40 thttpd_log.41
mv thttpd_log.39 thttpd_log.40
mv thttpd_log.38 thttpd_log.39
mv thttpd_log.37 thttpd_log.38
mv thttpd_log.36 thttpd_log.37
mv thttpd_log.35 thttpd_log.36
mv thttpd_log.34 thttpd_log.35
mv thttpd_log.33 thttpd_log.34
mv thttpd_log.32 thttpd_log.33
mv thttpd_log.31 thttpd_log.32
mv thttpd_log.30 thttpd_log.31
mv thttpd_log.29 thttpd_log.30
mv thttpd_log.28 thttpd_log.29
mv thttpd_log.27 thttpd_log.28
mv thttpd_log.26 thttpd_log.27
mv thttpd_log.25 thttpd_log.26
mv thttpd_log.24 thttpd_log.25
mv thttpd_log.23 thttpd_log.24
mv thttpd_log.22 thttpd_log.23
mv thttpd_log.21 thttpd_log.22
mv thttpd_log.20 thttpd_log.21
mv thttpd_log.19 thttpd_log.20
mv thttpd_log.18 thttpd_log.19
mv thttpd_log.17 thttpd_log.18
mv thttpd_log.16 thttpd_log.17
mv thttpd_log.15 thttpd_log.16
mv thttpd_log.14 thttpd_log.15
mv thttpd_log.13 thttpd_log.14
mv thttpd_log.12 thttpd_log.13
mv thttpd_log.11 thttpd_log.12
mv thttpd_log.10 thttpd_log.11
mv thttpd_log.09 thttpd_log.10
mv thttpd_log.08 thttpd_log.09
mv thttpd_log.07 thttpd_log.08
mv thttpd_log.06 thttpd_log.07
mv thttpd_log.05 thttpd_log.06
mv thttpd_log.04 thttpd_log.05
mv thttpd_log.03 thttpd_log.04
mv thttpd_log.02 thttpd_log.03
mv thttpd_log.01 thttpd_log.02

date >> thttpd_log
echo "log rotate end, thttpd pid = " `ps -C thttpd` >> thttpd_log
w >> thttpd_log

mv thttpd_log thttpd_log.01

date > thttpd_log
echo "old log rotate end, old thttpd pid = " `ps -C thttpd` >> thttpd_log

kill -usr1 `cat /var/run/thttpd.pid`

sleep 15

echo "log rotate new, thttpd pid = " `ps -C thttpd` >> thttpd_log
w >> thttpd_log

#
frank@raspberrypi:/home/local/sbin/os-debug $ 




frank@raspberrypi:/home/local/sbin/os-debug $ cat dead-thttpd     ### 3305
#!/bin/sh
# dead-thttpd

 echo "old dead-thttpd pid = " `cat /var/run/thttpd.pid` >> /home/local/www/logs/thttpd_log
 date >> /home/local/www/logs/thttpd_log
 w >> /home/local/www/logs/thttpd_log

# sleep 15
# echo "dead-thttpd, new thttpd pid = " `ps -C thttpd` >> /home/local/www/logs/thttpd_log
#  date >> /home/local/www/logs/thttpd_log
#  w >> /home/local/www/logs/thttpd_log

#

frank@raspberrypi:/home/local/sbin/os-debug $ 




frank@raspberrypi:/home/local/sbin/os-debug $ cat datelog     ### 3325
#!/bin/sh
# datelog

 echo "datelog, thttpd pid = " `ps -C thttpd` >> /home/local/www/logs/thttpd_log
 date >> /home/local/www/logs/thttpd_log
 w >> /home/local/www/logs/thttpd_log

#

frank@raspberrypi:/home/local/sbin/os-debug $ 




frank@raspberrypi:/home/local/sbin/os-debug $ date     ### 3340
Thu 07 Jul 2022 06:43:53 PM MDT
frank@raspberrypi:/home/local/sbin/os-debug $ 



frank@raspberrypi:/home/local/sbin/os-debug $ ### sudo datelog is entered at the command prompt and there has been a problem with the system finding it, which I will test. When the commands are run from the system they all work but there seems to be a bug with them coming from the command line. 3346
frank@raspberrypi:/home/local/sbin/os-debug $ 




frank@raspberrypi:/home/local/sbin/os-debug $ cd /etc/cron.daily     ### 3352
frank@raspberrypi:/etc/cron.daily $ 


frank@raspberrypi:/etc/cron.daily $ ls -al     ### 3356
total 32
drwxr-xr-x   2 root  root  4096 Jul  7 17:30 .
drwxr-xr-x 120 root  root  4096 Jul  7 17:26 ..
-rwxr-xr-x   1 root  root  1478 Jun 10  2021 apt-compat
-rwxr-xr-x   1 root  root  1298 Jan 29  2021 dpkg
-rwxr-xr-x   1 root  root   377 Feb 28  2021 logrotate
-rwxr-xr-x   1 root  root  1123 Feb 19  2021 man-db
-rw-r--r--   1 root  root   102 Feb 22  2021 .placeholder
-rwxr-xr--   1 frank frank 1965 Aug 31  2021 thttpd-rotate
frank@raspberrypi:/etc/cron.daily $ 



frank@raspberrypi:/etc/cron.daily $ cat thttpd-rotate     ### 3370
#!/bin/sh
# /etc/cron.daily/thttpd-rotate

cd /home/local/www/logs
rm -f thttpd_log.50

mv thttpd_log.49 thttpd_log.50
mv thttpd_log.48 thttpd_log.49
mv thttpd_log.47 thttpd_log.48
mv thttpd_log.46 thttpd_log.47
mv thttpd_log.45 thttpd_log.46
mv thttpd_log.44 thttpd_log.45
mv thttpd_log.43 thttpd_log.44
mv thttpd_log.42 thttpd_log.43
mv thttpd_log.41 thttpd_log.42
mv thttpd_log.40 thttpd_log.41
mv thttpd_log.39 thttpd_log.40
mv thttpd_log.38 thttpd_log.39
mv thttpd_log.37 thttpd_log.38
mv thttpd_log.36 thttpd_log.37
mv thttpd_log.35 thttpd_log.36
mv thttpd_log.34 thttpd_log.35
mv thttpd_log.33 thttpd_log.34
mv thttpd_log.32 thttpd_log.33
mv thttpd_log.31 thttpd_log.32
mv thttpd_log.30 thttpd_log.31
mv thttpd_log.29 thttpd_log.30
mv thttpd_log.28 thttpd_log.29
mv thttpd_log.27 thttpd_log.28
mv thttpd_log.26 thttpd_log.27
mv thttpd_log.25 thttpd_log.26
mv thttpd_log.24 thttpd_log.25
mv thttpd_log.23 thttpd_log.24
mv thttpd_log.22 thttpd_log.23
mv thttpd_log.21 thttpd_log.22
mv thttpd_log.20 thttpd_log.21
mv thttpd_log.19 thttpd_log.20
mv thttpd_log.18 thttpd_log.19
mv thttpd_log.17 thttpd_log.18
mv thttpd_log.16 thttpd_log.17
mv thttpd_log.15 thttpd_log.16
mv thttpd_log.14 thttpd_log.15
mv thttpd_log.13 thttpd_log.14
mv thttpd_log.12 thttpd_log.13
mv thttpd_log.11 thttpd_log.12
mv thttpd_log.10 thttpd_log.11
mv thttpd_log.09 thttpd_log.10
mv thttpd_log.08 thttpd_log.09
mv thttpd_log.07 thttpd_log.08
mv thttpd_log.06 thttpd_log.07
mv thttpd_log.05 thttpd_log.06
mv thttpd_log.04 thttpd_log.05
mv thttpd_log.03 thttpd_log.04
mv thttpd_log.02 thttpd_log.03
mv thttpd_log.01 thttpd_log.02

date >> thttpd_log
echo "log rotate end, thttpd pid = " `ps -C thttpd` >> thttpd_log
w >> thttpd_log

mv thttpd_log thttpd_log.01

date > thttpd_log
echo "old log rotate end, old thttpd pid = " `ps -C thttpd` >> thttpd_log

kill -usr1 `cat /var/run/thttpd.pid`

sleep 15

echo "log rotate new, thttpd pid = " `ps -C thttpd` >> thttpd_log
w >> thttpd_log

#
frank@raspberrypi:/etc/cron.daily $ 




### That looks better! there is a sleep 15 near the end and that is to wait for the new PID to be set up.

### Notice that this program takes 15 seconds so that the new PID number will have time to come up.

### Also, the lines are not written to the log file until they finish. The "kill -usr1 `cat /var/run/thttpd.pid`" stops thttpd from taking more requests. The "kill -usr1 `cat /var/run/thttpd.pid`" stops thttpd from taking any more requests but lets the ones that are running finish before it starts again with a new log file. That is why at times one will see extra lines after the log rotate normal ending.




frank@raspberrypi:/etc/cron.daily $ sudo ./thttpd-rotate     ### sudo 3458
mv: cannot stat 'thttpd_log.49': No such file or directory
mv: cannot stat 'thttpd_log.48': No such file or directory
mv: cannot stat 'thttpd_log.47': No such file or directory
mv: cannot stat 'thttpd_log.46': No such file or directory
mv: cannot stat 'thttpd_log.45': No such file or directory
mv: cannot stat 'thttpd_log.44': No such file or directory
mv: cannot stat 'thttpd_log.43': No such file or directory
mv: cannot stat 'thttpd_log.42': No such file or directory
mv: cannot stat 'thttpd_log.41': No such file or directory
mv: cannot stat 'thttpd_log.40': No such file or directory
mv: cannot stat 'thttpd_log.39': No such file or directory
mv: cannot stat 'thttpd_log.38': No such file or directory
mv: cannot stat 'thttpd_log.37': No such file or directory
mv: cannot stat 'thttpd_log.36': No such file or directory
mv: cannot stat 'thttpd_log.35': No such file or directory
mv: cannot stat 'thttpd_log.34': No such file or directory
mv: cannot stat 'thttpd_log.33': No such file or directory
mv: cannot stat 'thttpd_log.32': No such file or directory
mv: cannot stat 'thttpd_log.31': No such file or directory
mv: cannot stat 'thttpd_log.30': No such file or directory
mv: cannot stat 'thttpd_log.29': No such file or directory
mv: cannot stat 'thttpd_log.28': No such file or directory
mv: cannot stat 'thttpd_log.27': No such file or directory
mv: cannot stat 'thttpd_log.26': No such file or directory
mv: cannot stat 'thttpd_log.25': No such file or directory
mv: cannot stat 'thttpd_log.24': No such file or directory
mv: cannot stat 'thttpd_log.23': No such file or directory
mv: cannot stat 'thttpd_log.22': No such file or directory
mv: cannot stat 'thttpd_log.21': No such file or directory
mv: cannot stat 'thttpd_log.20': No such file or directory
mv: cannot stat 'thttpd_log.19': No such file or directory
mv: cannot stat 'thttpd_log.18': No such file or directory
mv: cannot stat 'thttpd_log.17': No such file or directory
mv: cannot stat 'thttpd_log.16': No such file or directory
mv: cannot stat 'thttpd_log.15': No such file or directory
mv: cannot stat 'thttpd_log.14': No such file or directory
mv: cannot stat 'thttpd_log.13': No such file or directory
mv: cannot stat 'thttpd_log.12': No such file or directory
mv: cannot stat 'thttpd_log.11': No such file or directory
mv: cannot stat 'thttpd_log.10': No such file or directory
mv: cannot stat 'thttpd_log.09': No such file or directory
mv: cannot stat 'thttpd_log.08': No such file or directory
mv: cannot stat 'thttpd_log.07': No such file or directory
mv: cannot stat 'thttpd_log.06': No such file or directory
mv: cannot stat 'thttpd_log.05': No such file or directory
mv: cannot stat 'thttpd_log.04': No such file or directory
mv: cannot stat 'thttpd_log.03': No such file or directory
mv: cannot stat 'thttpd_log.02': No such file or directory
frank@raspberrypi:/etc/cron.daily $ 
frank@raspberrypi:/etc/cron.daily $ 



frank@raspberrypi:/etc/cron.daily $ sudo datelog     ### 3512
sudo: datelog: command not found
frank@raspberrypi:/etc/cron.daily $ # This is the problem when the command is entered from the command line and it is not in "/usr/local/sbin/" even though all of the other commands ran from "/home/local/sbin/"!    3514



frank@raspberrypi:/etc/cron.daily $ sudo ls -al /home/local/sbin     ### 3518
total 192
drwxr-xr-x 4 root  root    4096 Jul  7 18:40 .
drwxr-xr-x 5 root  root    4096 Jul  7 16:44 ..
-rwxr-xr-- 1 frank frank    185 Aug 31  2021 datelog
-r-xr-xr-- 1 frank frank    185 Aug 31  2021 datelog~
-rwxr-xr-- 1 frank frank    385 Aug 31  2021 dead-thttpd
-r-xr-xr-- 1 frank frank    385 Aug 31  2021 dead-thttpd~
-rwxr-xr-x 1 root  root   15296 Jul  7 16:44 htpasswd
-rwxr-sr-x 1 root  www    14504 Jul  7 16:44 makeweb
drwxr-xr-x 2 frank frank   4096 Jul  7 12:03 os-debug
-r-xr-xr-x 1 root  root    2878 Jul  7 16:44 syslogtocern
-r-xr-xr-x 1 bin   bin   121272 Jul  7 16:44 thttpd
drwxr-xr-x 3 frank frank   4096 Jul  7 12:03 thttpd-extras
-rwxr-xr-- 1 frank frank    153 Aug 31  2021 thttpd_wrapper
frank@raspberrypi:/etc/cron.daily $ 



frank@raspberrypi:/etc/cron.daily $ sudo cp -iav /home/local/sbin/* /usr/local/sbin     ### sudo 3537
'/home/local/sbin/datelog' -> '/usr/local/sbin/datelog'
'/home/local/sbin/datelog~' -> '/usr/local/sbin/datelog~'
'/home/local/sbin/dead-thttpd' -> '/usr/local/sbin/dead-thttpd'
'/home/local/sbin/dead-thttpd~' -> '/usr/local/sbin/dead-thttpd~'
'/home/local/sbin/htpasswd' -> '/usr/local/sbin/htpasswd'
'/home/local/sbin/makeweb' -> '/usr/local/sbin/makeweb'
'/home/local/sbin/os-debug' -> '/usr/local/sbin/os-debug'
'/home/local/sbin/os-debug/readme.txt~' -> '/usr/local/sbin/os-debug/readme.txt~'
'/home/local/sbin/os-debug/readme.txt' -> '/usr/local/sbin/os-debug/readme.txt'
'/home/local/sbin/os-debug/dead-thttpd' -> '/usr/local/sbin/os-debug/dead-thttpd'
'/home/local/sbin/os-debug/thttpd-rotate~' -> '/usr/local/sbin/os-debug/thttpd-rotate~'
'/home/local/sbin/os-debug/thttpd-rotate' -> '/usr/local/sbin/os-debug/thttpd-rotate'
'/home/local/sbin/os-debug/datelog~' -> '/usr/local/sbin/os-debug/datelog~'
'/home/local/sbin/os-debug/dead-thttpd~' -> '/usr/local/sbin/os-debug/dead-thttpd~'
'/home/local/sbin/os-debug/thttpd_wrapper' -> '/usr/local/sbin/os-debug/thttpd_wrapper'
'/home/local/sbin/os-debug/datelog' -> '/usr/local/sbin/os-debug/datelog'
'/home/local/sbin/os-debug/thttpd_wrapper~' -> '/usr/local/sbin/os-debug/thttpd_wrapper~'
'/home/local/sbin/syslogtocern' -> '/usr/local/sbin/syslogtocern'
'/home/local/sbin/thttpd' -> '/usr/local/sbin/thttpd'
'/home/local/sbin/thttpd-extras' -> '/usr/local/sbin/thttpd-extras'
'/home/local/sbin/thttpd-extras/thttpd.sh' -> '/usr/local/sbin/thttpd-extras/thttpd.sh'
'/home/local/sbin/thttpd-extras/thttpd_config' -> '/usr/local/sbin/thttpd-extras/thttpd_config'
'/home/local/sbin/thttpd-extras/anvil_thttpd.gif' -> '/usr/local/sbin/thttpd-extras/anvil_thttpd.gif'
'/home/local/sbin/thttpd-extras/readme.txt' -> '/usr/local/sbin/thttpd-extras/readme.txt'
'/home/local/sbin/thttpd-extras/thttpd-rotate~' -> '/usr/local/sbin/thttpd-extras/thttpd-rotate~'
'/home/local/sbin/thttpd-extras/thttpd.sh~' -> '/usr/local/sbin/thttpd-extras/thttpd.sh~'
'/home/local/sbin/thttpd-extras/thttpd_config~' -> '/usr/local/sbin/thttpd-extras/thttpd_config~'
'/home/local/sbin/thttpd-extras/sitemap.xml' -> '/usr/local/sbin/thttpd-extras/sitemap.xml'
'/home/local/sbin/thttpd-extras/thttpd-rotate' -> '/usr/local/sbin/thttpd-extras/thttpd-rotate'
'/home/local/sbin/thttpd-extras/sitemap.xml.txt' -> '/usr/local/sbin/thttpd-extras/sitemap.xml.txt'
'/home/local/sbin/thttpd-extras/favicon.ico' -> '/usr/local/sbin/thttpd-extras/favicon.ico'
'/home/local/sbin/thttpd-extras/rc.local~' -> '/usr/local/sbin/thttpd-extras/rc.local~'
'/home/local/sbin/thttpd-extras/thttpd_wrapper' -> '/usr/local/sbin/thttpd-extras/thttpd_wrapper'
'/home/local/sbin/thttpd-extras/robots-site.txt' -> '/usr/local/sbin/thttpd-extras/robots-site.txt'
'/home/local/sbin/thttpd-extras/robots.txt' -> '/usr/local/sbin/thttpd-extras/robots.txt'
'/home/local/sbin/thttpd-extras/rc.local' -> '/usr/local/sbin/thttpd-extras/rc.local'
'/home/local/sbin/thttpd-extras/thttpd_wrapper~' -> '/usr/local/sbin/thttpd-extras/thttpd_wrapper~'
'/home/local/sbin/thttpd-extras/vhost-DN-test' -> '/usr/local/sbin/thttpd-extras/vhost-DN-test'
'/home/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128' -> '/usr/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128'
'/home/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128/a0' -> '/usr/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128/a0'
'/home/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128/sample.txt' -> '/usr/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128/sample.txt'
'/home/local/sbin/thttpd-extras/vhost-DN-test/a0' -> '/usr/local/sbin/thttpd-extras/vhost-DN-test/a0'
'/home/local/sbin/thttpd-extras/vhost-DN-test/a0/test' -> '/usr/local/sbin/thttpd-extras/vhost-DN-test/a0/test'
'/home/local/sbin/thttpd_wrapper' -> '/usr/local/sbin/thttpd_wrapper'
frank@raspberrypi:/etc/cron.daily $ 



frank@raspberrypi:/etc/cron.daily $ ls -al /usr/local/sbin     ### 3586
total 192
drwxr-xr-x  4 root  root    4096 Jul  7 18:48 .
drwxr-xr-x 10 root  root    4096 Apr  4 08:25 ..
-rwxr-xr--  1 frank frank    185 Aug 31  2021 datelog
-r-xr-xr--  1 frank frank    185 Aug 31  2021 datelog~
-rwxr-xr--  1 frank frank    385 Aug 31  2021 dead-thttpd
-r-xr-xr--  1 frank frank    385 Aug 31  2021 dead-thttpd~
-rwxr-xr-x  1 root  root   15296 Jul  7 16:44 htpasswd
-rwxr-sr-x  1 root  www    14504 Jul  7 16:44 makeweb
drwxr-xr-x  2 frank frank   4096 Jul  7 12:03 os-debug
-r-xr-xr-x  1 root  root    2878 Jul  7 16:44 syslogtocern
-r-xr-xr-x  1 bin   bin   121272 Jul  7 16:44 thttpd
drwxr-xr-x  3 frank frank   4096 Jul  7 12:03 thttpd-extras
-rwxr-xr--  1 frank frank    153 Aug 31  2021 thttpd_wrapper
frank@raspberrypi:/etc/cron.daily $ 



frank@raspberrypi:/etc/cron.daily $ sudo datelog     ### 3605
frank@raspberrypi:/etc/cron.daily $ 
frank@raspberrypi:/etc/cron.daily $ ### Magic!! Now sudo datelog works!!! The only thing different is the command is coming from the command line and not from a program which all of the other commands come from and work without being under /usr/local/sbin/!!! 3607
frank@raspberrypi:/etc/cron.daily $ 




frank@raspberrypi:/etc/cron.daily $ cd /home/local/www/logs     ### 3613
frank@raspberrypi:/home/local/www/logs $ 


frank@raspberrypi:/home/local/www/logs $ ls -al     ### 3617
total 24
drwxr-xr-x 2 root   www     4096 Jul  7 18:46 .
drwxr-xr-x 5 root   www     4096 Jul  7 17:33 ..
-rw-r--r-- 1 nobody nogroup  879 Jul  7 18:49 thttpd_log
-rw-r--r-- 1 nobody nogroup 4114 Jul  7 18:46 thttpd_log.01
-rw-r--r-- 1 nobody nogroup 2239 Jul  7 18:09 thttpd_log.02
frank@raspberrypi:/home/local/www/logs $


 
frank@raspberrypi:/home/local/www/logs $ cat *log.02     ### 3628
::1 - - [07/Jul/2022:23:42:42 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
::1 - - [07/Jul/2022:23:42:47 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 138x33-2)"
192.168.1.187 - - [08/Jul/2022:00:03:47 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:18 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:25 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:31 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.187 - - [08/Jul/2022:00:04:41 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.187/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:05:39 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:05:45 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:03 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:13 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
192.168.1.86 - - [08/Jul/2022:00:06:20 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.86/" "ELinks/0.13.2 (textmode; Linux 5.15.32-v8+ aarch64; 134x13-2)"
Thu 07 Jul 2022 06:09:09 PM MDT
 18:09:09 up  2:03,  2 users,  load average: 0.37, 0.26, 0.20
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:04m  5:24   0.59s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:04m  0.06s  0.05s -bash
frank@raspberrypi:/home/local/www/logs $ 



frank@raspberrypi:/home/local/www/logs $ cat *log.01     ### 3650
Thu 07 Jul 2022 06:09:09 PM MDT
 18:09:09 up  2:03,  2 users,  load average: 0.37, 0.26, 0.20
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:04m  5:24   0.59s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:04m  0.06s  0.05s -bash
192.168.1.219 - - [08/Jul/2022:00:21:22 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:21:22 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.3.0) Gecko/68.3.0 Firefox/68.3.0"
192.168.1.219 - - [08/Jul/2022:00:21:35 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.187/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:21:49 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.187/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:21:54 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.187/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:25 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:26 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.3.0) Gecko/68.3.0 Firefox/68.3.0"
192.168.1.219 - - [08/Jul/2022:00:22:36 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.86/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:40 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.86/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:45 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.86/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.219 - - [08/Jul/2022:00:22:51 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.86/" "Mozilla/5.0 (Android 4.4.2; Mobile; rv:68.0) Gecko/68.0 Firefox/68.0"
192.168.1.241 - - [08/Jul/2022:00:33:15 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:33:44 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.187/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:34:19 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.187/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:34:28 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.187/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:34:35 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.187/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:35:14 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:35:26 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.86/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:35:32 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.86/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
192.168.1.241 - - [08/Jul/2022:00:35:36 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.86/" "Mozilla/5.0 (Android 6.0; Mobile; rv:102.0) Gecko/102.0 Firefox/102.0"
Thu 07 Jul 2022 06:46:22 PM MDT
log rotate end, thttpd pid =  PID TTY TIME CMD 3760 ? 00:00:26 thttpd
 18:46:22 up  2:41,  2 users,  load average: 0.61, 0.30, 0.21
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:41m  6:25   0.68s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:41m  0.06s  0.05s -bash
frank@raspberrypi:/home/local/www/logs $ 



frank@raspberrypi:/home/local/www/logs $ cat *log     ### 3686
Thu 07 Jul 2022 06:46:22 PM MDT
old log rotate end, old thttpd pid =  PID TTY TIME CMD 3760 ? 00:00:26 thttpd
log rotate new, thttpd pid =  PID TTY TIME CMD 4072 ? 00:00:00 thttpd
 18:46:37 up  2:41,  2 users,  load average: 0.68, 0.33, 0.22
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:41m  6:25   0.68s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:41m  0.06s  0.05s -bash
datelog, thttpd pid =  PID TTY TIME CMD 4072 ? 00:00:01 thttpd
Thu 07 Jul 2022 06:49:12 PM MDT
 18:49:12 up  2:43,  2 users,  load average: 0.08, 0.23, 0.20
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
frank    tty7     :0               16:05    2:44m  6:30   0.69s /usr/bin/lxsession -s LXDE-pi -e LXDE
frank    tty1     -                16:05    2:44m  0.06s  0.05s -bash
frank@raspberrypi:/home/local/www/logs $ 
frank@raspberrypi:/home/local/www/logs $ 



### As you can see thttpd can be updated while it is still running!

### While it is still running I will finish with adding more "users" to the web site.
frank@AC0XL-Raspberry-Pi-2B-1-1:/home/local/www/logs $ 




frank@raspberrypi:/home/local/www/logs $ date     ### 3713
Thu 07 Jul 2022 06:52:17 PM MDT
frank@raspberrypi:/home/local/www/logs $ 


 

# *****************************
# *****************************



frank@raspberrypi:/home/local/www/logs $ cd /home/    ### 3725
frank@raspberrypi:/home $ 



# Adding more Web Users, (Headings).


# Other ideas for web "users" could be: documents, downloads, games, memes, music, notices, pictures, videos, etc., just categories of what you want on your website, or what you want to share. This time we will use a different process to add only www users.




frank@raspberrypi:/home $ addgroup --help     ### 3738
adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID]
[--disabled-password] [--disabled-login] [--add_extra_groups] USER
   Add a normal user

adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID]
[--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password]
[--disabled-login] [--add_extra_groups] USER
   Add a system user

adduser --group [--gid ID] GROUP
addgroup [--gid ID] GROUP
   Add a user group

addgroup --system [--gid ID] GROUP
   Add a system group

adduser USER GROUP
   Add an existing user to an existing group

general options:
  --quiet | -q      don't give process information to stdout
  --force-badname   allow usernames which do not match the
                    NAME_REGEX configuration variable
  --help | -h       usage message
  --version | -v    version number and copyright
  --conf | -c FILE  use FILE as configuration file

frank@raspberrypi:/home $ 



# This is where if you have a list of typed "users" you can just copy the "name" and then be able to paste it several times without having to re-type it, or making typing mistakes.  I made the file "list.txt" in the freedom directory.



#
# Again the process:
#
#         sudo adduser --ingroup www videos    # (new web user "videos")
#                 (use a password that is different from the one for "(pi)")
#         su videos    # (shell to user "videos")
#         cd     # (change to shell home directory)
#         touch .user-number   # that is a period and the number all in one, (.user-number)
#         makeweb
#         ls -al
#         exit         # (exit the shell back to where you were)
#
#
# *********
# 



frank@raspberrypi:/home $ cat ~/freedom/list.txt     ### 3793
list.txt

  a0  documents  downloads  memes  music  notices  pictures  videos  

frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ date     ### 3801
Thu 07 Jul 2022 06:54:02 PM MDT
frank@raspberrypi:/home $ 



frank@raspberrypi:/home $ sudo adduser --ingroup www documents     ### sudo 3807
Adding user `documents' ...
Adding new user `documents' (1002) with group `www' ...
Creating home directory `/home/documents' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for documents
Enter the new value, or press ENTER for the default

	Full Name []: documents
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ su documents     ### 3827
Password: 
documents@raspberrypi:/home $ 

documents@raspberrypi:/home $ cd     ### 3831
documents@raspberrypi:~ $ 

documents@raspberrypi:~ $ touch .1002     ### 3834
documents@raspberrypi:~ $ 

documents@raspberrypi:~ $ makeweb     ### 3837
Created web directory /home/local/www/users/documents
Created symbolic link /home/documents/public_html
documents@raspberrypi:~ $ 

documents@raspberrypi:~ $ ls -al     ### 3842
total 24
drwxr-xr-x 2 documents www  4096 Jul  7 18:56 .
drwxr-xr-x 6 root      root 4096 Jul  7 18:54 ..
-rw-r--r-- 1 documents www     0 Jul  7 18:56 .1002
-rw-r--r-- 1 documents www   220 Jul  7 18:54 .bash_logout
-rw-r--r-- 1 documents www  3523 Jul  7 18:54 .bashrc
-rw-r--r-- 1 documents www  1670 Jul  7 18:54 .mkshrc
-rw-r--r-- 1 documents www   807 Jul  7 18:54 .profile
lrwxrwxrwx 1 documents www    31 Jul  7 18:56 public_html -> /home/local/www/users/documents
documents@raspberrypi:~ $ 

documents@raspberrypi:~ $ exit     ### 3854
exit
frank@raspberrypi:/home $ 
f


rank@raspberrypi:/home $ date     ### 3860
Thu 07 Jul 2022 06:58:00 PM MDT
frank@raspberrypi:/home $ 




frank@raspberrypi:/home $ sudo adduser --ingroup www downloads     ### sudo 3867
Adding user `downloads' ...
Adding new user `downloads' (1003) with group `www' ...
Creating home directory `/home/downloads' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for downloads
Enter the new value, or press ENTER for the default

	Full Name []: downloads
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ su downloads     ### 3887
Password: 
downloads@raspberrypi:/home $ 

downloads@raspberrypi:/home $ cd     ### 3891
downloads@raspberrypi:~ $ 

downloads@raspberrypi:~ $ touch .1003     ### 3894
downloads@raspberrypi:~ $ 

downloads@raspberrypi:~ $ makeweb     ### 3897
Created web directory /home/local/www/users/downloads
Created symbolic link /home/downloads/public_html
downloads@raspberrypi:~ $ 

downloads@raspberrypi:~ $ ls -al     ### 3902
total 24
drwxr-xr-x 2 downloads www  4096 Jul  7 19:01 .
drwxr-xr-x 7 root      root 4096 Jul  7 18:58 ..
-rw-r--r-- 1 downloads www     0 Jul  7 19:00 .1003
-rw-r--r-- 1 downloads www   220 Jul  7 18:58 .bash_logout
-rw-r--r-- 1 downloads www  3523 Jul  7 18:58 .bashrc
-rw-r--r-- 1 downloads www  1670 Jul  7 18:58 .mkshrc
-rw-r--r-- 1 downloads www   807 Jul  7 18:58 .profile
lrwxrwxrwx 1 downloads www    31 Jul  7 19:01 public_html -> /home/local/www/users/downloads
downloads@raspberrypi:~ $ 

downloads@raspberrypi:~ $ exit     ### 3914
exit
frank@raspberrypi:/home $ 



frank@raspberrypi:/home $ date     ### 3920
Thu 07 Jul 2022 07:02:15 PM MDT
frank@raspberrypi:/home $ 




frank@raspberrypi:/home $ sudo adduser --ingroup www memes     ### sudo 3927
Adding user `memes' ...
Adding new user `memes' (1004) with group `www' ...
Creating home directory `/home/memes' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for memes
Enter the new value, or press ENTER for the default

	Full Name []: memes
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ su memes     ### 3947
Password: 
memes@raspberrypi:/home $ 

memes@raspberrypi:/home $ cd     ### 3951
memes@raspberrypi:~ $ 

memes@raspberrypi:~ $ touch .1004     ### 3954
memes@raspberrypi:~ $ 

memes@raspberrypi:~ $ makeweb     ### 3957
Created web directory /home/local/www/users/memes
Created symbolic link /home/memes/public_html
memes@raspberrypi:~ $ 

memes@raspberrypi:~ $ ls -al     ### 3962
total 24
drwxr-xr-x 2 memes www  4096 Jul  7 19:04 .
drwxr-xr-x 8 root  root 4096 Jul  7 19:02 ..
-rw-r--r-- 1 memes www     0 Jul  7 19:04 .1004
-rw-r--r-- 1 memes www   220 Jul  7 19:02 .bash_logout
-rw-r--r-- 1 memes www  3523 Jul  7 19:02 .bashrc
-rw-r--r-- 1 memes www  1670 Jul  7 19:02 .mkshrc
-rw-r--r-- 1 memes www   807 Jul  7 19:02 .profile
lrwxrwxrwx 1 memes www    27 Jul  7 19:04 public_html -> /home/local/www/users/memes
memes@raspberrypi:~ $ 

memes@raspberrypi:~ $ exit     ### 3974
exit
frank@raspberrypi:/home $ 




frank@raspberrypi:/home $ sudo adduser --ingroup www music     ### sudo 3981
Adding user `music' ...
Adding new user `music' (1005) with group `www' ...
Creating home directory `/home/music' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for music
Enter the new value, or press ENTER for the default

	Full Name []: music
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ su music     ### 4001
Password: 
music@raspberrypi:/home $ 

music@raspberrypi:/home $ cd     ### 4005
music@raspberrypi:~ $ 

music@raspberrypi:~ $ touch .1005     ### 4008
music@raspberrypi:~ $ 

music@raspberrypi:~ $ makeweb     ### 4011
Created web directory /home/local/www/users/music
Created symbolic link /home/music/public_html
music@raspberrypi:~ $ 

music@raspberrypi:~ $ ls -al     ### 4016
total 24
drwxr-xr-x 2 music www  4096 Jul  7 19:07 .
drwxr-xr-x 9 root  root 4096 Jul  7 19:05 ..
-rw-r--r-- 1 music www     0 Jul  7 19:07 .1005
-rw-r--r-- 1 music www   220 Jul  7 19:05 .bash_logout
-rw-r--r-- 1 music www  3523 Jul  7 19:05 .bashrc
-rw-r--r-- 1 music www  1670 Jul  7 19:05 .mkshrc
-rw-r--r-- 1 music www   807 Jul  7 19:05 .profile
lrwxrwxrwx 1 music www    27 Jul  7 19:07 public_html -> /home/local/www/users/music
music@raspberrypi:~ $ 

music@raspberrypi:~ $ exit     ### 4028
exit
frank@raspberrypi:/home $




frank@raspberrypi:/home $ sudo adduser --ingroup www notices     ### sudo 4035
Adding user `notices' ...
Adding new user `notices' (1006) with group `www' ...
Creating home directory `/home/notices' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for notices
Enter the new value, or press ENTER for the default

	Full Name []: notices
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ su notices     ### 4055
Password: 
notices@raspberrypi:/home $ 

notices@raspberrypi:/home $ cd      ### 4059
notices@raspberrypi:~ $ 

notices@raspberrypi:~ $ touch .1006     ### 4062
notices@raspberrypi:~ $ 

notices@raspberrypi:~ $ makeweb     ### 4065
Created web directory /home/local/www/users/notices
Created symbolic link /home/notices/public_html
notices@raspberrypi:~ $ 

notices@raspberrypi:~ $ ls -al     ### 4070
total 24
drwxr-xr-x  2 notices www  4096 Jul  7 19:10 .
drwxr-xr-x 10 root    root 4096 Jul  7 19:08 ..
-rw-r--r--  1 notices www     0 Jul  7 19:10 .1006
-rw-r--r--  1 notices www   220 Jul  7 19:08 .bash_logout
-rw-r--r--  1 notices www  3523 Jul  7 19:08 .bashrc
-rw-r--r--  1 notices www  1670 Jul  7 19:08 .mkshrc
-rw-r--r--  1 notices www   807 Jul  7 19:08 .profile
lrwxrwxrwx  1 notices www    29 Jul  7 19:10 public_html -> /home/local/www/users/notices
notices@raspberrypi:~ $ 

notices@raspberrypi:~ $ exit     ### 4082
exit
frank@raspberrypi:/home $ 




frank@raspberrypi:/home $ sudo adduser --ingroup www pictures     ### sudo 4089
Adding user `pictures' ...
Adding new user `pictures' (1007) with group `www' ...
Creating home directory `/home/pictures' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for pictures
Enter the new value, or press ENTER for the default

	Full Name []: pictures
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ su pictures     ### 4109
Password: 
pictures@raspberrypi:/home $ 

pictures@raspberrypi:/home $ cd     ### 4113
pictures@raspberrypi:~ $ 

pictures@raspberrypi:~ $ touch .1007     ### 4116
pictures@raspberrypi:~ $ 

pictures@raspberrypi:~ $ makeweb     ### 4119
Created web directory /home/local/www/users/pictures
Created symbolic link /home/pictures/public_html
pictures@raspberrypi:~ $ 

pictures@raspberrypi:~ $ ls -al     ### 4124
total 24
drwxr-xr-x  2 pictures www  4096 Jul  7 19:13 .
drwxr-xr-x 11 root     root 4096 Jul  7 19:11 ..
-rw-r--r--  1 pictures www     0 Jul  7 19:13 .1007
-rw-r--r--  1 pictures www   220 Jul  7 19:11 .bash_logout
-rw-r--r--  1 pictures www  3523 Jul  7 19:11 .bashrc
-rw-r--r--  1 pictures www  1670 Jul  7 19:11 .mkshrc
-rw-r--r--  1 pictures www   807 Jul  7 19:11 .profile
lrwxrwxrwx  1 pictures www    30 Jul  7 19:13 public_html -> /home/local/www/users/pictures
pictures@raspberrypi:~ $ 

pictures@raspberrypi:~ $ exit     ### 4136
exit
frank@raspberrypi:/home $ 




frank@raspberrypi:/home $ sudo adduser --ingroup www videos     ### sudo 4143
Adding user `videos' ...
Adding new user `videos' (1008) with group `www' ...
Creating home directory `/home/videos' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for videos
Enter the new value, or press ENTER for the default

	Full Name []: videos
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
frank@raspberrypi:/home $ 


frank@raspberrypi:/home $ su videos     ### 4163
Password: 
videos@raspberrypi:/home $ 

videos@raspberrypi:/home $ cd     ### 4167
videos@raspberrypi:~ $ 

videos@raspberrypi:~ $ touch .1008     ### 4170
videos@raspberrypi:~ $ 

videos@raspberrypi:~ $ makeweb     ### 4173
Created web directory /home/local/www/users/videos
Created symbolic link /home/videos/public_html
videos@raspberrypi:~ $ 

videos@raspberrypi:~ $ ls -al     ### 4178
total 24
drwxr-xr-x  2 videos www  4096 Jul  7 19:16 .
drwxr-xr-x 12 root   root 4096 Jul  7 19:14 ..
-rw-r--r--  1 videos www     0 Jul  7 19:16 .1008
-rw-r--r--  1 videos www   220 Jul  7 19:14 .bash_logout
-rw-r--r--  1 videos www  3523 Jul  7 19:14 .bashrc
-rw-r--r--  1 videos www  1670 Jul  7 19:14 .mkshrc
-rw-r--r--  1 videos www   807 Jul  7 19:14 .profile
lrwxrwxrwx  1 videos www    28 Jul  7 19:16 public_html -> /home/local/www/users/videos
videos@raspberrypi:~ $ 

videos@raspberrypi:~ $ exit     ### 4190
exit
frank@raspberrypi:/home $ 




frank@raspberrypi:/home $ ls -al     ### 4197
total 48
drwxr-xr-x 12 root      root  4096 Jul  7 19:14 .
drwxr-xr-x 21 root      root  4096 Jul  7 16:12 ..
drwxr-xr-x  2 a0        www   4096 Jul  7 16:56 a0
drwxr-xr-x  2 documents www   4096 Jul  7 18:57 documents
drwxr-xr-x  2 downloads www   4096 Jul  7 19:01 downloads
drwxr-xr-x 18 frank     frank 4096 Jul  7 17:42 frank
drwxr-xr-x  5 root      root  4096 Jul  7 16:44 local
drwxr-xr-x  2 memes     www   4096 Jul  7 19:05 memes
drwxr-xr-x  2 music     www   4096 Jul  7 19:08 music
drwxr-xr-x  2 notices   www   4096 Jul  7 19:11 notices
drwxr-xr-x  2 pictures  www   4096 Jul  7 19:14 pictures
drwxr-xr-x  2 videos    www   4096 Jul  7 19:17 videos
frank@raspberrypi:/home $ 




frank@raspberrypi:/home $ sudo chown -Rv a0:www a0     ### 4216
ownership of 'a0/.1001' retained as a0:www
ownership of 'a0/.bashrc' retained as a0:www
ownership of 'a0/.bash_logout' retained as a0:www
ownership of 'a0/.mkshrc' retained as a0:www
ownership of 'a0/.bash_history' retained as a0:www
ownership of 'a0/.profile' retained as a0:www
ownership of 'a0/public_html' retained as a0:www
ownership of 'a0' retained as a0:www
frank@raspberrypi:/home $ 



frank@raspberrypi:/home $ ls -al     ### 4229
total 48
drwxr-xr-x 12 root      root  4096 Jul  7 19:14 .
drwxr-xr-x 21 root      root  4096 Jul  7 16:12 ..
drwxr-xr-x  2 a0        www   4096 Jul  7 16:56 a0
drwxr-xr-x  2 documents www   4096 Jul  7 18:57 documents
drwxr-xr-x  2 downloads www   4096 Jul  7 19:01 downloads
drwxr-xr-x 18 frank     frank 4096 Jul  7 17:42 frank
drwxr-xr-x  5 root      root  4096 Jul  7 16:44 local
drwxr-xr-x  2 memes     www   4096 Jul  7 19:05 memes
drwxr-xr-x  2 music     www   4096 Jul  7 19:08 music
drwxr-xr-x  2 notices   www   4096 Jul  7 19:11 notices
drwxr-xr-x  2 pictures  www   4096 Jul  7 19:14 pictures
drwxr-xr-x  2 videos    www   4096 Jul  7 19:17 videos
frank@raspberrypi:/home $ 



frank@raspberrypi:/home $ cd /home/local/www/users     ### 4247
frank@raspberrypi:/home/local/www/users $ 



frank@raspberrypi:/home/local/www/users $ ls -al     ### 4252
total 52
drwxrwxr-x 10 root      www   4096 Jul  7 19:16 .
drwxr-xr-x  5 root      www   4096 Jul  7 17:33 ..
drwxr-xr-x  2 a0        www   4096 Jul  7 16:55 a0
drwxr-xr-x  2 documents www   4096 Jul  7 18:56 documents
drwxr-xr-x  2 downloads www   4096 Jul  7 19:01 downloads
-rw-r--r--  1 frank     frank  533 Jan  8  2020 favicon.ico
drwxr-xr-x  2 memes     www   4096 Jul  7 19:04 memes
drwxr-xr-x  2 music     www   4096 Jul  7 19:07 music
drwxr-xr-x  2 notices   www   4096 Jul  7 19:10 notices
drwxr-xr-x  2 pictures  www   4096 Jul  7 19:13 pictures
-rw-r--r--  1 frank     frank  308 Aug 13  2021 readme.txt
-rw-r--r--  1 frank     frank   27 Jan  8  2020 robots.txt
drwxr-xr-x  2 videos    www   4096 Jul  7 19:16 videos
frank@raspberrypi:/home/local/www/users $ 



frank@raspberrypi:/home/local/www/users $ date     ### 4271
Thu 07 Jul 2022 07:22:00 PM MDT
frank@raspberrypi:/home/local/www/users $ 



frank@raspberrypi:/home/local/www/users $ df -H     ### 4277
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        31G  6.5G   24G  22% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           796M  1.3M  795M   1% /run
tmpfs           5.3M  4.1k  5.3M   1% /run/lock
/dev/mmcblk0p1  265M   32M  233M  12% /boot
tmpfs           398M   33k  398M   1% /run/user/1000
frank@raspberrypi:/home/local/www/users $ 



frank@raspberrypi:/home/local/www/users $ date     ### 4290
Thu 07 Jul 2022 07:23:14 PM MDT
frank@raspberrypi:/home/local/www/users $ 



frank@raspberrypi:/home/local/www/users $ cd     ### 4296
frank@raspberrypi:~ $ 


frank@raspberrypi:~ $ ps -e     ### 4300
    PID TTY          TIME CMD
      1 ?        00:00:03 systemd
      2 ?        00:00:00 kthreadd
      3 ?        00:00:00 rcu_gp
      4 ?        00:00:00 rcu_par_gp
      8 ?        00:00:00 mm_percpu_wq
      9 ?        00:00:00 rcu_tasks_kthre
     10 ?        00:00:00 rcu_tasks_rude_
     11 ?        00:00:00 rcu_tasks_trace
     12 ?        00:00:00 ksoftirqd/0
     13 ?        00:00:11 rcu_preempt
     14 ?        00:00:00 migration/0
     15 ?        00:00:00 cpuhp/0
     16 ?        00:00:00 cpuhp/1
     17 ?        00:00:00 migration/1
     18 ?        00:00:00 ksoftirqd/1
     21 ?        00:00:00 cpuhp/2
     22 ?        00:00:00 migration/2
     23 ?        00:00:00 ksoftirqd/2
     26 ?        00:00:00 cpuhp/3
     27 ?        00:00:00 migration/3
     28 ?        00:00:00 ksoftirqd/3
     31 ?        00:00:00 kdevtmpfs
     32 ?        00:00:00 netns
     33 ?        00:00:00 inet_frag_wq
     36 ?        00:00:03 kworker/2:1-events
     38 ?        00:00:00 kauditd
     40 ?        00:00:00 khungtaskd
     41 ?        00:00:00 oom_reaper
     42 ?        00:00:00 writeback
     43 ?        00:00:00 kcompactd0
     63 ?        00:00:00 kblockd
     64 ?        00:00:00 blkcg_punt_bio
     65 ?        00:00:00 watchdogd
     67 ?        00:00:00 kworker/0:1H-mmc_complete
     68 ?        00:00:00 rpciod
     69 ?        00:00:02 kworker/u9:0-brcmf_wq/mmc1:0001:1
     70 ?        00:00:00 xprtiod
     72 ?        00:00:00 kswapd0
     73 ?        00:00:00 nfsiod
     74 ?        00:00:00 kthrotld
     75 ?        00:00:00 iscsi_eh
     76 ?        00:00:00 iscsi_conn_clea
     77 ?        00:00:00 nvme-wq
     78 ?        00:00:00 nvme-reset-wq
     79 ?        00:00:00 nvme-delete-wq
     81 ?        00:00:00 DWC Notificatio
     82 ?        00:00:00 uas
     83 ?        00:00:00 vchiq-slot/0
     84 ?        00:00:00 vchiq-recy/0
     85 ?        00:00:00 vchiq-sync/0
     86 ?        00:00:00 zswap-shrink
     87 ?        00:00:00 sdhci
     88 ?        00:00:00 irq/47-mmc0
     91 ?        00:00:00 mmc_complete
     92 ?        00:00:00 kworker/3:1H-kblockd
     93 ?        00:00:00 kworker/1:1H-kblockd
     94 ?        00:00:00 jbd2/mmcblk0p2-
     95 ?        00:00:00 ext4-rsv-conver
     99 ?        00:00:00 kworker/2:2H-kblockd
    100 ?        00:00:00 mld
    101 ?        00:00:00 ipv6_addrconf
    145 ?        00:00:01 systemd-journal
    152 ?        00:00:03 kworker/2:3-mm_percpu_wq
    167 ?        00:00:01 systemd-udevd
    200 ?        00:00:00 vchiq-keep/0
    201 ?        00:00:00 SMIO
    219 ?        00:00:00 mmal-vchiq
    220 ?        00:00:00 mmal-vchiq
    222 ?        00:00:00 mmal-vchiq
    224 ?        00:00:00 mmal-vchiq
    228 ?        00:00:26 v3d_bin
    229 ?        00:00:29 v3d_render
    230 ?        00:00:00 v3d_tfu
    231 ?        00:00:00 v3d_csd
    232 ?        00:00:00 v3d_cache_clean
    234 ?        00:00:00 mmal-vchiq
    239 ?        00:00:00 mmal-vchiq
    247 ?        00:00:00 mmal-vchiq
    281 ?        00:00:00 cfg80211
    312 ?        00:00:00 brcmf_wq/mmc1:0
    316 ?        00:00:00 brcmf_wdog/mmc1
    395 ?        00:00:00 irq/38-vc4 hdmi
    396 ?        00:00:00 irq/39-vc4 hdmi
    397 ?        00:00:00 cec-vc4
    398 ?        00:00:00 irq/35-vc4 hdmi
    400 ?        00:00:00 irq/34-vc4 hdmi
    401 ?        00:00:00 irq/44-vc4 hdmi
    403 ?        00:00:00 irq/45-vc4 hdmi
    404 ?        00:00:00 cec-vc4
    405 ?        00:00:00 irq/41-vc4 hdmi
    406 ?        00:00:00 irq/40-vc4 hdmi
    408 ?        00:00:00 card1-crtc0
    409 ?        00:00:00 card1-crtc1
    410 ?        00:00:00 card1-crtc2
    411 ?        00:00:00 card1-crtc3
    412 ?        00:00:00 card1-crtc4
    413 ?        00:00:00 card1-crtc5
    420 ?        00:00:00 avahi-daemon
    422 ?        00:00:00 cron
    423 ?        00:00:00 avahi-daemon
    426 ?        00:00:00 dbus-daemon
    465 ?        00:00:00 polkitd
    497 ?        00:00:00 rsyslogd
    500 ?        00:00:00 systemd-logind
    505 ?        00:00:11 thd
    507 ?        00:00:00 udisksd
    509 ?        00:00:00 wpa_supplicant
    539 ?        00:00:00 ModemManager
    553 ?        00:00:00 rngd
    558 ?        00:00:00 cupsd
    571 ?        00:00:00 lightdm
    573 ?        00:00:00 dhcpcd
    607 tty7     00:07:50 Xorg
    608 tty1     00:00:00 login
    610 ?        00:00:00 cups-browsed
    633 ?        00:00:00 wpa_supplicant
    769 ?        00:00:00 lightdm
    774 ?        00:00:00 systemd
    775 ?        00:00:00 (sd-pam)
    789 ?        00:00:00 pipewire
    790 ?        00:00:04 pulseaudio
    791 ?        00:00:00 lxsession
    802 ?        00:00:00 dbus-daemon
    803 ?        00:00:00 rtkit-daemon
    811 ?        00:00:00 pipewire-media-
    848 ?        00:00:00 ssh-agent
    876 ?        00:00:00 gvfsd
    879 tty1     00:00:00 bash
    890 ?        00:00:00 gvfsd-fuse
    906 ?        00:03:52 mutter
    908 ?        00:00:00 lxpolkit
    911 ?        00:03:34 lxpanel
    912 ?        00:00:05 pcmanfm
    925 ?        00:00:00 applet.py
    926 ?        00:00:00 ssh-agent
    954 ?        00:00:00 hciattach
    957 ?        00:00:00 kworker/u9:2-hci0
    962 ?        00:00:00 bluetoothd
    981 ?        00:00:00 krfcommd
   1010 ?        00:00:00 menu-cached
   1015 ?        00:00:00 gvfs-udisks2-vo
   1023 ?        00:00:00 gvfs-afc-volume
   1028 ?        00:00:00 gvfs-gphoto2-vo
   1032 ?        00:00:00 gvfs-mtp-volume
   1036 ?        00:00:00 gvfs-goa-volume
   1041 ?        00:00:00 gvfsd-trash
   1256 ?        00:00:00 systemd-timesyn
   1258 ?        00:03:22 geany
   1266 pts/0    00:00:00 bash
   1279 ?        00:00:05 packagekitd
   2664 ?        00:00:10 lxterminal
   2670 pts/1    00:00:00 bash
   2699 ?        00:00:00 gvfsd-metadata
   2730 ?        00:00:37 mousepad
   2739 ?        00:00:00 xfconfd
   2746 ?        00:00:00 dconf-service
   2760 ?        00:00:00 gvfsd-network
   2766 ?        00:00:00 gvfsd-smb-brows
   2774 ?        00:00:00 gvfsd-dnssd
   3464 ?        00:00:30 pluma
   3674 pts/0    00:00:00 thttpd_wrapper
   3995 ?        00:00:01 kworker/u8:1-events_unbound
   4072 ?        00:00:25 thttpd
   4075 ?        00:00:01 kworker/0:1-events
   4129 ?        00:00:00 kworker/1:2-mm_percpu_wq
   4207 ?        00:00:00 kworker/u8:3-events_unbound
   4230 ?        00:00:00 kworker/3:0H
   4241 ?        00:00:00 kworker/3:0-mm_percpu_wq
   4263 ?        00:00:00 kworker/0:0H
   4268 ?        00:00:00 kworker/1:0-events_power_efficient
   4287 ?        00:00:00 kworker/2:0H
   4320 ?        00:00:00 kworker/1:1-events
   4326 ?        00:00:00 kworker/1:0H
   4328 ?        00:00:00 kworker/3:2-mm_percpu_wq
   4334 ?        00:00:00 kworker/u8:2-events_unbound
   4337 ?        00:00:00 kworker/2:0-mm_percpu_wq
   4347 ?        00:00:00 kworker/0:0-events
   4355 ?        00:00:00 kworker/3:1-events_freezable
   4359 ?        00:00:00 kworker/2:2-mm_percpu_wq
   4361 ?        00:00:00 kworker/3:3-mm_percpu_wq
   4362 ?        00:00:00 kworker/1:3-events_power_efficient
   4363 ?        00:00:00 kworker/0:2-events
   4369 pts/0    00:00:00 ps
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ date     ### 4489
Thu 07 Jul 2022 07:27:01 PM MDT
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ df -H     ### 4495
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        31G  6.5G   24G  22% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           796M  1.3M  795M   1% /run
tmpfs           5.3M  4.1k  5.3M   1% /run/lock
/dev/mmcblk0p1  265M   32M  233M  12% /boot
tmpfs           398M   33k  398M   1% /run/user/1000
frank@raspberrypi:~ $ 



frank@raspberrypi:~ $ ls -al     ### This is to check if anything got added here like a touch number or the public_html symbolic link. 4508
total 100
drwxr-xr-x 18 frank frank 4096 Jul  7 17:42 .
drwxr-xr-x 12 root  root  4096 Jul  7 19:14 ..
-rw-------  1 frank frank  332 Jul  7 16:05 .bash_history
-rw-r--r--  1 frank frank  220 Apr  4 08:28 .bash_logout
-rw-r--r--  1 frank frank 3523 Apr  4 08:28 .bashrc
drwxr-xr-x  2 frank frank 4096 Apr  4 08:36 Bookshelf
drwxr-xr-x  6 frank frank 4096 Jul  7 12:07 .cache
drwx------ 17 frank frank 4096 Jul  7 15:32 .config
drwxr-xr-x  2 frank frank 4096 Jul  7 11:22 Desktop
drwxr-xr-x  2 frank frank 4096 Jul  7 11:22 Documents
drwxr-xr-x  2 frank frank 4096 Jul  7 11:22 Downloads
drwx------  2 frank frank 4096 Jul  7 18:06 .elinks
lrwxrwxrwx  1 frank frank   31 Jul  7 16:34 freedom -> freedom-new-05-19-2022/freedom/
drwxr-xr-x  5 frank frank 4096 Jul  7 14:06 freedom-new-05-19-2022
drwxr-xr-x  3 frank frank 4096 Apr  4 08:36 .local
drwx------  5 frank frank 4096 Jul  7 12:05 .mozilla
drwxr-xr-x  2 frank frank 4096 Jul  7 11:22 Music
drwxr-xr-x  2 frank frank 4096 Jul  7 11:22 Pictures
drwx------  3 frank frank 4096 Jul  7 11:22 .pp_backup
-rw-r--r--  1 frank frank  807 Apr  4 08:28 .profile
drwxr-xr-x  2 frank frank 4096 Jul  7 11:22 Public
drwxr-xr-x  2 frank frank 4096 Jul  7 11:22 Templates
drwxr-xr-x  2 frank frank 4096 Jul  7 11:22 Videos
-rw-------  1 frank frank   56 Jul  7 16:05 .Xauthority
-rw-------  1 frank frank 2555 Jul  7 16:05 .xsession-errors
-rw-------  1 frank frank 2522 Jul  7 12:00 .xsession-errors.old
frank@raspberrypi:~ $ 



### partial ps -e follows:
   2730 ?        00:00:37 mousepad
   2739 ?        00:00:00 xfconfd
   2746 ?        00:00:00 dconf-service
   2760 ?        00:00:00 gvfsd-network
   2766 ?        00:00:00 gvfsd-smb-brows
   2774 ?        00:00:00 gvfsd-dnssd
   3464 ?        00:00:30 pluma
   3674 pts/0    00:00:00 thttpd_wrapper
   3995 ?        00:00:01 kworker/u8:1-events_unbound
   4072 ?        00:00:25 thttpd
   4075 ?        00:00:01 kworker/0:1-events
   4129 ?        00:00:00 kworker/1:2-mm_percpu_wq
   4207 ?        00:00:00 kworker/u8:3-events_unbound
   4230 ?        00:00:00 kworker/3:0H
   4241 ?        00:00:00 kworker/3:0-mm_percpu_wq
   4263 ?        00:00:00 kworker/0:0H
   4268 ?        00:00:00 kworker/1:0-events_power_efficient
   4287 ?        00:00:00 kworker/2:0H
   4320 ?        00:00:00 kworker/1:1-events
   4326 ?        00:00:00 kworker/1:0H
   4328 ?        00:00:00 kworker/3:2-mm_percpu_wq
   4334 ?        00:00:00 kworker/u8:2-events_unbound
   4337 ?        00:00:00 kworker/2:0-mm_percpu_wq
   4347 ?        00:00:00 kworker/0:0-events
   4355 ?        00:00:00 kworker/3:1-events_freezable
   4359 ?        00:00:00 kworker/2:2-mm_percpu_wq
   4361 ?        00:00:00 kworker/3:3-mm_percpu_wq
   4362 ?        00:00:00 kworker/1:3-events_power_efficient
   4363 ?        00:00:00 kworker/0:2-events
   4369 pts/0    00:00:00 ps
frank@raspberrypi:~ $ 


   3464 ?        00:00:30 pluma
   3674 pts/0    00:00:00 thttpd_wrapper
   3995 ?        00:00:01 kworker/u8:1-events_unbound
   4072 ?        00:00:25 thttpd
   4075 ?        00:00:01 kworker/0:1-events

### Notice the wrapper is still running at 3674 while thttpd is at 4072 and it should show up in the log files when the PID's were changed.




# Stop the computer, then start the computer to see where "thttpd_wrapper" ends up, by using ps -e, as the computer loads from scratch!     4585

# *****************************


cd /etc		###


pi@raspberrypi:/etc $ # less services     ### This will show a listing of service ports.

# (This file has a list of "Ports" that are in use. The default "HTTP port is 80.") thttpd's default port is 80, port numbers are 16-bit so can range from 1 - 65536. Only one service can use a port number at a time, thus we see that my Raspberry Pi web server will give the same information on all of the IPv4 addresses that are attached to it, i.e., eth0, and wlan0 with its different IP addresses are both connected to the same http port 80. In a classroom situation, more than 200 students can be connected to the same "C" class network (192.168.xxx.0/24) and can each connect to each other's web servers, where xxx is the same for all, and the 0 position can very from 2 - 254, with 0 representing the network, 255 is reserved for the broadcast address, and 1 reserved for the router address. With the router set up as a “DHCP Server” all of the computers would receive dynamic IP addresses and all of their http websites would be available in the addresses they were assigned. The http port number (80) is assigned by thttpd and the IP addresses are assigned from the router.
pi@raspberrypi:/etc $ 



### The router separates the “Local Area Network” (LAN) from the “Wide Area Network” (WAN). Just as the HTTP default address is port 80 and is static, the router has to have the internal IP address for our website “static” so it can pass information back and forth from our internal web server to the external Internet. In the file “2019-10-01-website.txt” I discuss the process of setting the internal web server to a static internal IP address.


# In the router, under the “Advanced” tab, select “Virtual Server”, and it should display a message similar to: “This page allows you to configure a virtual server, so others can access the server through the Gateway.” This will probably very with different routers so one might have to search a bit to find the similar place. The “usual Service Name” should have a selection of something like “web” or “http” and choose this. It should then show the “Protocol” as “TCP”, “WAN Port” as “80”, and “LAN Open Port” as “80”. In the “LAN IP Address” type in the static internal IP address of your web server, and press, “Apply Changes”.  This should fill in a table in “Current Virtual Server Forwarding Table” with “ServerName - WEB”, “Protocol - tcp”, “Local IP Address - 192.168.x.2” i.e., your internal IP address, “Local Port - 80-80”, “WAN Port - 80-80”, “State - Enable”, and possibly “Action either Delete or Disable”.

# With this enabled, your website should be available to the WAN. Since your ISP is providing your external IP address, it doesn’t matter if it is dynamic or static. Until you get an idea of the activity that is taking place on the web, it would probably be good just to have a dynamic address if that is what you have. If you are in an area of extreme censorship, it will make the censorship game more of a “Cat and Mouse” game since your site could be bouncing around all sorts of different IP addresses. “Free Speech for the WORLD!”



# Another reason we use "/home" user directories in the "www" group is to be able to keep all of our original web files there and then just send a copy to the "public_html" directory where it is instantly live. This also reduces the size of our web site by eliminating the bloat of having original files mixed in with our files needed for the web site. It will also reduce the time it will take for the Web Search "spiders" to see what content is available on our sites. When we use "HTML" code for our web pages, the root of the page will be in "index.html" and then the items listed in this file can be in the same directory or in sub directories. If you have a lot of "images" on your web page, you would probably want to put all of them in a sub-directory called, "images" just to keep similar things together and easier to find. To test your "index.html" file, you just open it with a web browser and see if everything is functioning. Then when everything is OK, just move your changed file and additions to "public_html", and then open your web browser to "http://xxx.xxx.xxx.xxx/" and see if everything is working. Most web browsers keep a copy of your pages in cache so if the changes don't appear you will have to refresh your web page (usually the little circle with an arrow on it). If the changes still don't appear, possibly you forgot to move the changes to "public_html". Just a reminder, all of the directories in "public_html" need to be "0755" to work and files need to be "0644" to work. If you get to the point of using "cgi" programs they will also need to be "0755" so they can execute, and also need to have the right ending on those files, the documentation for "thttpd" talks about all of this. Sometimes I even need to use "0754" if it is a program type file that should be readable. 



# *****************************



	By using "thttpd" one can have their own "web Server" as one of the number of "web-facing computers." These are the numbers for the whole World! It is totally amazing that there are so few "web-facing computers"! Using your own web server computer directly connected to the internet, one does not have to worry about being banned by some big corporation! For pennies, your site can reach the whole world! This is the new "printing press" for the people of the world! With Raspberry Pi's using only 7 - 10 watts of power or less, one does not have to consider how much their electric bill will be, as when computers used several hundred watts of power, day in and day out. Power to the people of the WORLD!


# Https://news.netcraft.com - August 2021 Web Server Survey - 25th August, 2021

# In the August 2021 survey we received responses from 1,211,444,849 sites across 263,733,974 unique domains and 11,327,711 web-facing computers. This reflects a loss of 4.99 million sites, but a gain of 1.64 million domains and 67,600 computers.



# Https://news.netcraft.com - February 2022 Web Server Survey - 28th February, 2022

# In the February 2022 survey we received responses from 1,173,621,471 sites across 271,199,972 unique domains and 11,774,714 web-facing computers. This reflects a gain of 5.91 million sites, 1.36 million domains and 73,800 computers.



# Https://news.netcraft.com - March 2022 Web Server Survey - 29th March, 2022

In the March 2022 survey we received responses from 1,169,621,187 sites across 272,177,331 unique domains and 11,877,217 web-facing computers. This reflects a loss of 4.00 million sites, but a gain of 977,000 domains and 103,000 web facing computers.



# Https://news.netcraft.com - April 2022 Web Server Survey - 27th April, 2022

In the April 2022 survey we received responses from 1,160,964,134 sites across 271,960,629 unique domains and 11,974,636 web-facing computers. This reflects a loss of 8.66 million sites and 217,000 domains, but a gain of 97,400 computers.



# Https://news.netcraft.com - May 2022 Web Server Survey - 30th May, 2022

In the May 2022 survey we received responses from 1,155,729,496 sites across 273,593,762 unique domains and 12,069,814 web-facing computers. This reflects a loss of 5.23 million sites but a gain of 1.63 million domains and 95,200 computers.



# Https://news.netcraft.com - June 2022 Web Server Survey - 30th June, 2022

In the June 2022 survey we received responses from 1,146,976,964 sites across 273,010,403 unique domains and 12,224,786 web-facing computers. This reflects a loss of 8.75 million sites and 583,000 domains, but a gain of 155,000 computers.



# *****************************


###


### Setting the router for World Wide Web service

### It took me a long time to finally figure out how to set up the router so most people could do it without too much trouble. My routers are old so will be different than newer ones, but I will go through three routers that I have and that might help.

### 1:  D-Link GO-RT-N300, 12VDC @ 0.5 Amps. Out of the box, it's address is: 192.168.0.1 but I set mine to: 192.168.19.1, just so it would have less trouble with neighboring routers. In the setup page, under "Local Network" and on "DHCP Server Settings" I selected my IP Pool Range from 192.168.19.10 to 192.168.19.254, that blocked the section of addresses of 192.168.19.2 through 192.168.19.9 so I could use them for static IP Addresses, and used 192.168.19.2 for my web server.
#    The next header "DHCP Static IP Configuration" has: 
#    
#    IP Address:     0.0.0.0
#    Mac Address:  000000000000      (ex. 00E086710502)
#    
#    followed with selections: Add, Update, Delete Selection, and Reset.
#
#    The next header "DHCP Static IP Table"
# 
#    Select  IP Address         MAC Address
#      ()    192.168.19.2    DC:A6:32:19:95:B9
# 
#    As I remember it would say that "192.168.19.2" was not in the pool, but I think I managed to get it to accept it by clicking the Select and then the update choice.
# 
#    Click on the top header "Advanced" and then at the bottom of the list "Virtual Server". On this page, the box will list "Virtual Service Name" and the choice that is right is "WEB" which will bring up "WEB" Protocol "TCP" WAN Port "80" LAN Port "80" LAN IP Address "xxx.xxx.xxx.xxx" (actually no xxx's) but is where you enter the IP Address of your web server. Then click "apply changes" (Since) The header below is: 
#    "Current Virtual Server Forwarding Table"
#    ServerName      Protocol    Local IP Address    Local Port      WAN Port    State            Action
#        WEB           tcp         192.168.19.2        80-80          80-80      Enable       Delete Disable
#
#
### 2:  Zonet, ZSR4154WE(01), 802.11n Wireless Broadband Router, Power: 9V-1A, IEEE 802.11n - 150Mbps, RJ-45 10/100Mbps, IP Address: 192.168.0.1
#    On "192.168.0.1/main.html", Select "Virtual Server", then "Port Range Forwarding", and under "Well Known Service Ports", select "HTTP(80) and then "ADD" (1-10) for possible selections. This populates the selected line with: "Start Port - End Port" with "80 - 80", "To IP Address" "192.168.0.""100", "Protocol", "TCP", "Enable", "checked". Then click "Apply", and "Logout".
# 
#
### 3:  Western Digital My Net N750, 12 VDC @ 2 Amps, Tabs: Additional Features / Port Forwarding
# 
#    Under Advanced Settings, LAN, DHCP Server: Enable DHCP Server = ON; DHCP IP Address Range = 192.168.1.10 to 192.168.1.254 then under "Device and Client Tables" at the bottom: 

Manually Added Devices

IP Address: 	192.168.1.2
MAC Address:	(dotted hex address)
Device Name: 	AC0XL-WWW-Pi-4B
 and then "save".

#    Under Advanced Settings, Additional Features, Port Forwarding: 

#    Port Forwarding
#    This option is used to open multiple ports or a range of ports in your router and redirect data through those ports to a single computer on your network. This feature allows you to enter external start port, external end port, and internal start port in the fields. The internal end port will be generated automatically. This option is only applicable to the Internet session.
#
# Enabled    Name: HTTP              Application Name: HTTP          External Port Range     From: 80        To: 80  Protocol TCP
# IP Address: 192.168.1.138  Computer Name: frank-desktop (102.168.1.138)    Internal Port Range     From: 80        To: 80

# Port Forwarding Rules

Enabled check box.
	
Application Name: HTTP - Populates Name.
External Port Range
From: 	80
To: 	80
Internal Port Range
From: 	80
To: 	80

	Protocol
TCP - set by program.

Computer Name: AC0XL-www-Pi-4B (192.168.1.2) - Populates IP Address and may check enabled.
IP Address: 192.168.1.2
	
Computer Name: Enabled 	
	
#
#            Then "SAVE".
#
#    This pretty much automates the process. One would need to set a static IP address on the web server machine so it would always be at the same address.
#
# *****************************



     Sample log entries of (https://GitHub.com/robertdavidgraham/masscan):
35.224.226.217 - - [09/Jun/2020:19:38:12 +0000] "GET / HTTP/1.0" 200 25000 "" "mas scan/1.0 (https://GitHub.com/robertdavidgraham/masscan)"
167.99.40.21 - - [10/Jun/2020:05:12:24 +0000] "GET / HTTP/1.0" 200 25000 "" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)"
204.48.16.150 - - [10/Jun/2020:21:05:48 +0000] "GET / HTTP/1.0" 200 25000 "" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)"
191.252.193.79 - - [11/Jun/2020:06:43:28 +0000] "GET / HTTP/1.0" 200 25000 "" "masscan/1.0 (https://github.com/robertdavidgraham/masscan)"

MASSCAN: Mass IP port scanner
masscan(8) -- Fast scan of the Internet
DESCRIPTION
 *   masscan is an Internet-scale port scanner, useful for large scale surveys of the Internet, or of internal networks. While the default transmit rate is only 100 packets/second, it can optional go as fast as 25 million packets/second, a rate sufficient to scan the Internet in 3 minutes for one port.
 *   Older write ups of this site showed that a 1 gigabit Internet connection could scan the Internet in 45 minutes for one port! Can you imagine a Raspberry Pi 4B doing that feat?


# *****************************


http://162.250.19.7/freedom/freedom.zip

Power to the People of the World! Build your own Bullet Proof World Wide Web Server!, and don’t be BANNED!
Frank Anderson, ac0xl
*

http://162.250.19.7/

http://162.250.19.7/freedom/freedom.zip

http://162.250.19.7/ac0xl/logs/

http://162.250.19.7/ac0xl/www/
*

# *****************************
#
#
###    Links:
#    These links are the easiest and best I have found for sharing the “Good News” I found around my seventh birthday, the Fall of 1955. Frank Anderson, ac0xl.
# http://4laws.com/laws/languages.html, 4 Spiritual Laws.
# https://www.cru.org/us/en/train-and-grow/spiritual-growth/the-spirit-filled-life.html, The Spirit Filled Life.
# https://www.cru.org, Exploring Your Life’s Purpose - Let’s journey together.
# https://godtoolsapp.com, GodTools - Helping You Share Your Faith.
#
# ***************************************










