2023-12-09-new-Pi-OS-thttpd-build.txt



#    I have removed some of the extra files from freedom.zip, but they are still in the freedom/ directory on 162.250.19.7 and still under the older zip files.   ### 5

#	A 32-bit OS will be limited to serving files smaller than 2 GB. A 64-bit OS will serve files basically with an unlimited file size! "thttpd" is a slight modification of the file from Acme.com which used to be the number seven (7) most popular HTTP file server. Out of the box it is read only but can do CGI which possibly could open up vulnerabilities. By using just an IP Address (xxx.xxx.xxx.xxx) one bypasses the vulnerabilities that are associated with the "Domain Name Server" (DNS), see the DNS/ directory under http://162.250.19.7/ and then the freedom/ directory. The web site will come up with a green screen with directory listings. To open the directory or file just click on it. Clicking on "../" two dots and a slash, will take one back up one level. I have been manually posting the updates for news.netcraft.com.txt which contains the number of computers and web sites World Wide around the end of each month "freedom/news.netcraft.com/news.netcraft.com.txt". "thttpd" is an industrial grade http server (port 80) and was run by many large companies. Without DNS thttpd is secure and bullet proof enough that even a third or fourth grader should be able to build their own "World Wide Web Site!" that runs for just pennies! My site 162.250.19.7 running on a Raspberry Pi 400 uses only 7 to 10 watts which is a far cry from what computers back in the 1990s used. "thttpd" will actually run on a computer that has only 512 MB of RAM, but with the recent upgrades will just cause these machines to thrash for lack of memory when one is trying to build the program or even trying to run some of the built-in programs! I finally got a Pi Zero 2 B (64-bit) and want to see how it will perform using probably less than 5 watts. I also ended up getting a Pi Zero W (32-bit) and will also test it.   ### 7

#	I have been using a 128 GB microSDXC card with 51.5 GB of files live on the World Wide Web and now need to upgrade to a 256 GB microSDXC card! My router has a Gigabit LAN and a 100 Megabit WAN. There have been several that have pulled my complete site in a little over two hours, even though my internet connection is supposed to be 3 Megabit/second down and 1.5 Megabit/second up. I manually post my logs under "ac0xl/logs/" and one can see how much pounding thttpd can handle without being broken!   ### 9

#	Using the Pi 400 to build the microSD cards then putting the card into what one decides to use for the server makes a lot of sense since one does not have to worry about thrashing due to limited memory, plus it is a lot faster than a lot of other computers. On the 64-bit OS's I found the lite version (Size: 435MB) is the command prompt only but was so small I could not even read the text. Raspberry Pi OS (64-bit) with desktop (Size: 1,093MB) was always thrashing on the Zero 2 W and had to resort to the Pi 400. The first try was Raspberry Pi OS (64-bit) with desktop and recommended software (Size: 2,725MB) which took forever to download and then to upgrade due to Mathematica and the Wolfram Language being included in this release at over 1 gigabyte of extra file size. The windows environment is extremely SLOW!   ### 11

#	"thttpd" is designed to use a minimal file size and operate at extreme speeds, that is why one builds it from source to get the best performance from the smallest program size! Using "copy, paste, then enter" is a rather slow process but it saves a lot of typos! By listing the line numbers one is able to go back if their build has a problem and see where they made a mistake and then be able to continue from that point and finally get everything to work. I included many tests through the process and if there is a problem one should be able to see it before one gets too far past it. The whole process will take several hours, but one can continue from where they left off. Using "date" will give one an idea of how long the process is taking. The best thing is to read through the process and get an idea of where there are places one will have to use their own information. It will also give one an idea of what they want in their web site and be able to plan ahead!   ### 13


pi@raspberrypi:~ $ cd /proc   ### 16


pi@raspberrypi:/proc $ cat cpuinfo    ### 19
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

Revision	: c03130
Serial		: 1000000019c3b021
Model		: Raspberry Pi 400 Rev 1.0
pi@raspberrypi:/proc $ 
pi@raspberrypi:/proc $ 


pi@raspberrypi:/proc $ cat version   ### 63
Linux version 6.1.0-rpi7-rpi-v8 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24)
pi@raspberrypi:/proc $ 
pi@raspberrypi:/proc $ 


pi@raspberrypi:/proc $ cat meminfo   ### 69
MemTotal:        3884300 kB
MemFree:         2813192 kB
MemAvailable:    3362824 kB
Buffers:           29656 kB
Cached:           664588 kB
SwapCached:            0 kB
Active:           560172 kB
Inactive:         319312 kB
Active(anon):     285800 kB
Inactive(anon):     4332 kB
Active(file):     274372 kB
Inactive(file):   314980 kB
Unevictable:       67412 kB
Mlocked:               0 kB
SwapTotal:        102396 kB
SwapFree:         102396 kB
Zswap:                 0 kB
Zswapped:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:        252652 kB
Mapped:           203112 kB
Shmem:            104892 kB
KReclaimable:      34052 kB
Slab:              62524 kB
SReclaimable:      34052 kB
SUnreclaim:        28472 kB
KernelStack:        4624 kB
PageTables:         6812 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2044544 kB
Committed_AS:    1648704 kB
VmallocTotal:   259653632 kB
VmallocUsed:       12632 kB
VmallocChunk:          0 kB
Percpu:              704 kB
CmaTotal:         524288 kB
CmaFree:          493464 kB
pi@raspberrypi:/proc $ 
pi@raspberrypi:/proc $ 


pi@raspberrypi:/proc $ cd   ### 115
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ $PATH   ### 120
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:~ $ 
pi@raspberrypi:~ $ 

cd ~/freedom   ### 125   (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!!!   ### 127

#	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.   ### 129

#	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.   ### 131

#	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.   ### 133

#	"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."   ### 135

#	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.   ### 137

#	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:   ### 139

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

 
 cat ~/freedom/thttpd-extras/thttpd_config   ### 144
# /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:~ $ 
pi@raspberrypi:~ $ 





# /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:   ### 182

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

#	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.   ### 186

#	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.   ### 188

#	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!!!   ### 190


#	*****************************   ### 193


sudo apt update   ### sudo   196
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]      
Get:4 http://deb.debian.org/debian bookworm/main armhf Packages [8,497 kB] 
Hit:5 http://archive.raspberrypi.com/debian bookworm InRelease                              
Get:6 http://deb.debian.org/debian bookworm/main arm64 Packages [8,684 kB]                                        
Get:7 http://deb.debian.org/debian bookworm/main Translation-en [6,109 kB]                                        
Get:8 http://deb.debian.org/debian bookworm/contrib arm64 Packages [45.6 kB]                                      
Get:9 http://deb.debian.org/debian bookworm/contrib armhf Packages [42.9 kB]                                      
Get:10 http://deb.debian.org/debian bookworm/contrib Translation-en [48.7 kB]                                     
Get:11 http://deb.debian.org/debian bookworm/non-free arm64 Packages [75.4 kB]                                    
Get:12 http://deb.debian.org/debian bookworm/non-free armhf Packages [55.9 kB]                                    
Get:13 http://deb.debian.org/debian bookworm/non-free Translation-en [66.8 kB]                                    
Get:14 http://deb.debian.org/debian bookworm/non-free-firmware arm64 Packages [5,824 B]                           
Get:15 http://deb.debian.org/debian-security bookworm-security/main armhf Packages [101 kB]                       
Fetched 23.8 MB in 1min 9s (345 kB/s)                                                                             
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
29 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Repository 'http://deb.debian.org/debian bookworm InRelease' changed its 'Version' value from '12.2' to '12.3'
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $

 
pi@raspberrypi:~ $ sudo apt full-upgrade   ### sudo   222
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  base-files cups cups-client cups-common cups-core-drivers cups-daemon cups-ipp-utils cups-ppdc
  cups-server-common distro-info-data exfatprogs libcups2 libcupsimage2 libde265-0 libgnutls30 libpam-systemd
  libperl5.36 libqpdf29 libsystemd-shared libsystemd0 libudev1 perl perl-base perl-modules-5.36 systemd
  systemd-sysv systemd-timesyncd tzdata udev
29 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 19.9 MB of archives.
After this operation, 177 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main arm64 base-files arm64 12.4+deb12u3 [70.7 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 libperl5.36 arm64 5.36.0-7+deb12u1 [4,014 kB]
Get:3 http://deb.debian.org/debian bookworm/main arm64 perl arm64 5.36.0-7+deb12u1 [239 kB]                       
Get:4 http://deb.debian.org/debian bookworm/main arm64 perl-base arm64 5.36.0-7+deb12u1 [1,478 kB]                
Get:5 http://deb.debian.org/debian bookworm/main arm64 perl-modules-5.36 all 5.36.0-7+deb12u1 [2,815 kB]          
Get:6 http://deb.debian.org/debian bookworm/main arm64 systemd-sysv arm64 252.19-1~deb12u1 [41.8 kB]              
Get:7 http://deb.debian.org/debian bookworm/main arm64 libpam-systemd arm64 252.19-1~deb12u1 [208 kB]             
Get:8 http://deb.debian.org/debian bookworm/main arm64 systemd-timesyncd arm64 252.19-1~deb12u1 [61.1 kB]         
Get:9 http://deb.debian.org/debian bookworm/main arm64 systemd arm64 252.19-1~deb12u1 [2,828 kB]                  
Get:10 http://deb.debian.org/debian bookworm/main arm64 libsystemd-shared arm64 252.19-1~deb12u1 [1,506 kB]       
Get:11 http://deb.debian.org/debian bookworm/main arm64 libsystemd0 arm64 252.19-1~deb12u1 [307 kB]               
Get:12 http://deb.debian.org/debian bookworm/main arm64 cups-ipp-utils arm64 2.4.2-3+deb12u5 [228 kB]             
Get:13 http://deb.debian.org/debian bookworm/main arm64 cups-common all 2.4.2-3+deb12u5 [256 kB]                  
Get:14 http://deb.debian.org/debian bookworm/main arm64 cups-client arm64 2.4.2-3+deb12u5 [155 kB]                
Get:15 http://deb.debian.org/debian bookworm/main arm64 cups-core-drivers arm64 2.4.2-3+deb12u5 [37.7 kB]         
Get:16 http://deb.debian.org/debian bookworm/main arm64 cups-ppdc arm64 2.4.2-3+deb12u5 [117 kB]                  
Get:17 http://deb.debian.org/debian bookworm/main arm64 cups-server-common all 2.4.2-3+deb12u5 [413 kB]           
Get:18 http://deb.debian.org/debian bookworm/main arm64 cups-daemon arm64 2.4.2-3+deb12u5 [334 kB]                
Get:19 http://deb.debian.org/debian bookworm/main arm64 cups arm64 2.4.2-3+deb12u5 [274 kB]                       
Get:20 http://deb.debian.org/debian bookworm/main arm64 libcupsimage2 arm64 2.4.2-3+deb12u5 [16.8 kB]             
Get:21 http://deb.debian.org/debian bookworm/main arm64 libgnutls30 arm64 3.7.9-2+deb12u1 [1,313 kB]              
Get:22 http://deb.debian.org/debian bookworm/main arm64 libcups2 arm64 2.4.2-3+deb12u5 [229 kB]                   
Get:23 http://deb.debian.org/debian bookworm/main arm64 udev arm64 252.19-1~deb12u1 [1,600 kB]                    
Get:24 http://deb.debian.org/debian bookworm/main arm64 libudev1 arm64 252.19-1~deb12u1 [102 kB]                  
Get:25 http://deb.debian.org/debian bookworm/main arm64 tzdata all 2023c-5+deb12u1 [296 kB]                       
Get:26 http://deb.debian.org/debian bookworm/main arm64 distro-info-data all 0.58+deb12u1 [6,072 B]               
Get:27 http://deb.debian.org/debian bookworm/main arm64 exfatprogs arm64 1.2.0-1+deb12u1 [55.1 kB]                
Get:28 http://deb.debian.org/debian bookworm/main arm64 libde265-0 arm64 1.0.11-1+deb12u1 [148 kB]                
Get:29 http://deb.debian.org/debian bookworm/main arm64 libqpdf29 arm64 11.3.0-1+deb12u1 [767 kB]                 
Fetched 19.9 MB in 57s (348 kB/s)                                                                                 
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 145048 files and directories currently installed.)
Preparing to unpack .../base-files_12.4+deb12u3_arm64.deb ...
Unpacking base-files (12.4+deb12u3) over (12.4+deb12u2) ...
Setting up base-files (12.4+deb12u3) ...
Installing new version of config file /etc/debian_version ...
(Reading database ... 145048 files and directories currently installed.)
Preparing to unpack .../libperl5.36_5.36.0-7+deb12u1_arm64.deb ...
Unpacking libperl5.36:arm64 (5.36.0-7+deb12u1) over (5.36.0-7) ...
Preparing to unpack .../perl_5.36.0-7+deb12u1_arm64.deb ...
Unpacking perl (5.36.0-7+deb12u1) over (5.36.0-7) ...
Preparing to unpack .../perl-base_5.36.0-7+deb12u1_arm64.deb ...
Unpacking perl-base (5.36.0-7+deb12u1) over (5.36.0-7) ...
Setting up perl-base (5.36.0-7+deb12u1) ...
(Reading database ... 145048 files and directories currently installed.)
Preparing to unpack .../0-perl-modules-5.36_5.36.0-7+deb12u1_all.deb ...
Unpacking perl-modules-5.36 (5.36.0-7+deb12u1) over (5.36.0-7) ...
Preparing to unpack .../1-systemd-sysv_252.19-1~deb12u1_arm64.deb ...
Unpacking systemd-sysv (252.19-1~deb12u1) over (252.17-1~deb12u1) ...
Preparing to unpack .../2-libpam-systemd_252.19-1~deb12u1_arm64.deb ...
Unpacking libpam-systemd:arm64 (252.19-1~deb12u1) over (252.17-1~deb12u1) ...
Preparing to unpack .../3-systemd-timesyncd_252.19-1~deb12u1_arm64.deb ...
Unpacking systemd-timesyncd (252.19-1~deb12u1) over (252.17-1~deb12u1) ...
Preparing to unpack .../4-systemd_252.19-1~deb12u1_arm64.deb ...
Unpacking systemd (252.19-1~deb12u1) over (252.17-1~deb12u1) ...
Preparing to unpack .../5-libsystemd-shared_252.19-1~deb12u1_arm64.deb ...
Unpacking libsystemd-shared:arm64 (252.19-1~deb12u1) over (252.17-1~deb12u1) ...
Preparing to unpack .../6-libsystemd0_252.19-1~deb12u1_arm64.deb ...
Unpacking libsystemd0:arm64 (252.19-1~deb12u1) over (252.17-1~deb12u1) ...
Setting up libsystemd0:arm64 (252.19-1~deb12u1) ...
(Reading database ... 145048 files and directories currently installed.)
Preparing to unpack .../0-cups-ipp-utils_2.4.2-3+deb12u5_arm64.deb ...
Unpacking cups-ipp-utils (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../1-cups-common_2.4.2-3+deb12u5_all.deb ...
Unpacking cups-common (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../2-cups-client_2.4.2-3+deb12u5_arm64.deb ...
Unpacking cups-client (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../3-cups-core-drivers_2.4.2-3+deb12u5_arm64.deb ...
Unpacking cups-core-drivers (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../4-cups-ppdc_2.4.2-3+deb12u5_arm64.deb ...
Unpacking cups-ppdc (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../5-cups-server-common_2.4.2-3+deb12u5_all.deb ...
Unpacking cups-server-common (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../6-cups-daemon_2.4.2-3+deb12u5_arm64.deb ...
Unpacking cups-daemon (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../7-cups_2.4.2-3+deb12u5_arm64.deb ...
Unpacking cups (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../8-libcupsimage2_2.4.2-3+deb12u5_arm64.deb ...
Unpacking libcupsimage2:arm64 (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../9-libgnutls30_3.7.9-2+deb12u1_arm64.deb ...
Unpacking libgnutls30:arm64 (3.7.9-2+deb12u1) over (3.7.9-2) ...
Setting up libgnutls30:arm64 (3.7.9-2+deb12u1) ...
(Reading database ... 145048 files and directories currently installed.)
Preparing to unpack .../libcups2_2.4.2-3+deb12u5_arm64.deb ...
Unpacking libcups2:arm64 (2.4.2-3+deb12u5) over (2.4.2-3+deb12u4) ...
Preparing to unpack .../udev_252.19-1~deb12u1_arm64.deb ...
Unpacking udev (252.19-1~deb12u1) over (252.17-1~deb12u1) ...
Preparing to unpack .../libudev1_252.19-1~deb12u1_arm64.deb ...
Unpacking libudev1:arm64 (252.19-1~deb12u1) over (252.17-1~deb12u1) ...
Setting up libudev1:arm64 (252.19-1~deb12u1) ...
(Reading database ... 145048 files and directories currently installed.)
Preparing to unpack .../tzdata_2023c-5+deb12u1_all.deb ...
Unpacking tzdata (2023c-5+deb12u1) over (2023c-5) ...
Preparing to unpack .../distro-info-data_0.58+deb12u1_all.deb ...
Unpacking distro-info-data (0.58+deb12u1) over (0.58) ...
Preparing to unpack .../exfatprogs_1.2.0-1+deb12u1_arm64.deb ...
Unpacking exfatprogs (1.2.0-1+deb12u1) over (1.2.0-1) ...
Preparing to unpack .../libde265-0_1.0.11-1+deb12u1_arm64.deb ...
Unpacking libde265-0:arm64 (1.0.11-1+deb12u1) over (1.0.11-1) ...
Preparing to unpack .../libqpdf29_11.3.0-1+deb12u1_arm64.deb ...
Unpacking libqpdf29:arm64 (11.3.0-1+deb12u1) over (11.3.0-1) ...
Setting up cups-server-common (2.4.2-3+deb12u5) ...
Setting up exfatprogs (1.2.0-1+deb12u1) ...
Setting up distro-info-data (0.58+deb12u1) ...
Setting up cups-common (2.4.2-3+deb12u5) ...
Setting up tzdata (2023c-5+deb12u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline

Current default time zone: 'America/Denver'
Local time is now:      Sat Dec  9 14:40:19 MST 2023.
Universal Time is now:  Sat Dec  9 21:40:19 UTC 2023.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Setting up perl-modules-5.36 (5.36.0-7+deb12u1) ...
Setting up udev (252.19-1~deb12u1) ...
Setting up libsystemd-shared:arm64 (252.19-1~deb12u1) ...
Setting up libcups2:arm64 (2.4.2-3+deb12u5) ...
Setting up libde265-0:arm64 (1.0.11-1+deb12u1) ...
Setting up libperl5.36:arm64 (5.36.0-7+deb12u1) ...
Setting up libqpdf29:arm64 (11.3.0-1+deb12u1) ...
Setting up cups-ipp-utils (2.4.2-3+deb12u5) ...
Setting up cups-ppdc (2.4.2-3+deb12u5) ...
Setting up systemd (252.19-1~deb12u1) ...
Setting up cups-client (2.4.2-3+deb12u5) ...
Setting up libcupsimage2:arm64 (2.4.2-3+deb12u5) ...
Setting up perl (5.36.0-7+deb12u1) ...
Setting up cups-daemon (2.4.2-3+deb12u5) ...
Setting up systemd-timesyncd (252.19-1~deb12u1) ...
Setting up systemd-sysv (252.19-1~deb12u1) ...
Setting up cups-core-drivers (2.4.2-3+deb12u5) ...
Setting up cups (2.4.2-3+deb12u5) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Updating PPD files for cups ...
Updating PPD files for cups-filters ...
Updating PPD files for escpr ...
Updating PPD files for hpcups ...
Updating PPD files for postscript-hp ...
Setting up libpam-systemd:arm64 (252.19-1~deb12u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Processing triggers for libc-bin (2.36-9+rpt2+deb12u3) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for dbus (1.14.10-1~deb12u1) ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-rpi7-rpi-v8
update-initramfs: Generating /boot/initrd.img-6.1.0-rpi7-rpi-2712
update-initramfs: Generating /boot/initrd.img-6.1.0-rpi4-rpi-v8
update-initramfs: Generating /boot/initrd.img-6.1.0-rpi4-rpi-2712
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


#	*****************************   ### 394


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


sudo apt install whois     ### 400
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
whois is already the newest version (5.5.17).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ 


whois 162.250.19.7   ### 409

#
# 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-2023, 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


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

OrgNOCHandle: HICKM57-ARIN
OrgNOCName:   Hickman, Ryan 
OrgNOCPhone:  +1-435-259-8319 
OrgNOCEmail:  Ryan@Royceselectronics.com
OrgNOCRef:    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-2023, American Registry for Internet Numbers, Ltd.
#

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.   ### 479
pi@raspberrypi:~ $ 


#    "elinks" operates in a (new) 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.   ### 162


sudo apt install elinks   ### sudo 486
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  elinks-data libev4 libfsplib0 liblua5.1-0 libtre5
Suggested packages:
  elinks-doc tre-agrep
The following NEW packages will be installed:
  elinks elinks-data libev4 libfsplib0 liblua5.1-0 libtre5
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,132 kB of archives.
After this operation, 4,314 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main arm64 libev4 arm64 1:4.33-1 [41.3 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 libfsplib0 arm64 0.14-5 [13.5 kB]
Get:3 http://deb.debian.org/debian bookworm/main arm64 liblua5.1-0 arm64 5.1.5-9 [104 kB]
Get:4 http://deb.debian.org/debian bookworm/main arm64 libtre5 arm64 0.8.0-7 [53.8 kB]
Get:5 http://deb.debian.org/debian bookworm/main arm64 elinks-data all 0.13.2-1 [386 kB]
Get:6 http://deb.debian.org/debian bookworm/main arm64 elinks arm64 0.13.2-1+b4 [534 kB]
Fetched 1,132 kB in 4s (323 kB/s)
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Selecting previously unselected package libev4:arm64.
(Reading database ... 144887 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-9_arm64.deb ...
Unpacking liblua5.1-0:arm64 (5.1.5-9) ...
Selecting previously unselected package libtre5:arm64.
Preparing to unpack .../3-libtre5_0.8.0-7_arm64.deb ...
Unpacking libtre5:arm64 (0.8.0-7) ...
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+b4_arm64.deb ...
Unpacking elinks (0.13.2-1+b4) ...
Setting up libtre5:arm64 (0.8.0-7) ...
Setting up elinks-data (0.13.2-1) ...
Setting up libev4:arm64 (1:4.33-1) ...
Setting up libfsplib0 (0.14-5) ...
Setting up liblua5.1-0:arm64 (5.1.5-9) ...
Setting up elinks (0.13.2-1+b4) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u3) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for mailcap (3.70+nmu1) ...
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


sudo apt install elinks-doc tre-agrep   ### sudo 542
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  elinks-doc tre-agrep
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 172 kB of archives.
After this operation, 469 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main arm64 elinks-doc all 0.13.2-1 [162 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 tre-agrep arm64 0.8.0-7 [9,992 B]
Fetched 172 kB in 1s (264 kB/s) 
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Selecting previously unselected package elinks-doc.
(Reading database ... 145013 files and directories currently installed.)
Preparing to unpack .../elinks-doc_0.13.2-1_all.deb ...
Unpacking elinks-doc (0.13.2-1) ...
Selecting previously unselected package tre-agrep.
Preparing to unpack .../tre-agrep_0.8.0-7_arm64.deb ...
Unpacking tre-agrep (0.8.0-7) ...
Setting up elinks-doc (0.13.2-1) ...
Setting up tre-agrep (0.8.0-7) ...
Processing triggers for man-db (2.11.2-2) ...
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


sudo apt install elinks elinks-doc tre-agrep  ### sudo 571
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
elinks is already the newest version (0.13.2-1+b4).
elinks-doc is already the newest version (0.13.2-1).
tre-agrep is already the newest version (0.8.0-7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


sudo apt autoremove   ### sudo 583
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


# elinks 162.250.19.7   ### Start this in a new terminal!!! This is to get freedom.zip and put it in the main users (pi) directory.   ### 592  (in new terminal).
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 

#	When I clicked on "freedom.zip" a screen came up asking what to do? with a box that is checked saying Block the terminal which needs to be unchecked!!! Then select Save. To exit press "q" then press "yes" to: "Do you really want to quit?" or go to the help line and select Exit. One can scroll back in the terminal and see what was recorded after elinks closes.   ### 596

#	This is what I got from the elinks terminal after it closed and I scrolled back>   ### 598

pi@raspberrypi:~ $ elinks 162.250.19.7   ### Start this in a new terminal!!! This is to get freedom.zip and put it in the main users (pi) directory.   ### 592  (in new terminal).

                                                               Index of / (1/2) 
Index of /                                                                      
                                                                                
 mode  links    bytes  last-changed  name                                       
                                                                                
                                                                                
   ──────────────────────────────────────────────────────────────────────────   
                                                                                
 dr-x  15        4096  Sep  1  2022  ./                                         
 dr-x   5        4096  Apr  7  2022  ../                                        
 -r--   1      454970  Sep  1  2022  Bug-Report-Pi-400--program_usb_boot_mode=1 
 -r--   1      185361  Aug 15  2022  Bug-Report-Pi-400-2022-08-15.txt           
 dr-x  20        4096  Sep 16 01:46  ac0xl/                                     
 -r--   1       26886  Jul 22  2022  command-line-PATH-bug.txt                  
 dr-x   3        4096  Apr  8  2022  delinquent-accounts/                       
 dr-x   2        4096  Oct 14 22:18  documents/                                 
 dr-x  12        4096  Sep 15 02:14  downloads/                                 
 -r--   1         533  Apr  7  2022  favicon.ico                                
 dr-x  13        4096  Jul  1 00:25  freedom/                                   
 -r--   1     6805716  Jul 22  2022  freedom.zip                                
 dr-x   2        4096  Apr  8  2022  memes/                                     
 dr-x   3        4096  Apr  8  2022  music/                                     
 dr-x   3        4096  Oct 14 22:20  notices/                                   
http://162.250.19.7/                                162.250.19.7[15:07][------] 
                                                                                                       Index of / (1/2)Index of /                                                                                                                                                                                                                                     mode  links    bytes  last-changed  name                                                                                                                                                                                                                                                                                                                               ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────                                                                                                                          dr-x  15        4096  Sep  1  2022  ./                                                                                 dr-x   5        4096  Apr  7  2022  ../                                                                                -r--   1      454970  Sep  1  2022  Bug-Report-Pi-400--program_usb_boot_mode=1 - 2022-08-18 1403.eml                   -r--   1      185361  Aug 15  2022  Bug-Report-Pi-400-2022-08-15.txt                                                   dr-x  20        4096  Sep 16 01:46  ac0xl/                                                                             -r--   1       26886  Jul 22  2022  command-line-PATH-bug.txt                                                          dr-x   3        4096  Apr  8  2022  delinquent-accounts/                                                               dr-x   2        4096  Oct 14 22:18  documents/                                                                         dr-x  12        4096  Sep 15 02:14  downloads/                                                                         -r--   1         533  Apr  7  2022  favicon.ico                                                                        dr-x  13        4096  Jul  1 00:25  freedom/                                                                           -r--   1     6805716  Jul 22  2022  freedom.zip                                                                        dr-x   2        4096  Apr  8  2022  memes/                                                                             dr-x   3        4096  Apr  8  2022  music/                                                                             dr-x   3        4096  Oct 14 22:20  notices/                                                                           dr-x   5        4096  Oct  9 21:10  pictures/                                                                          -r--   1         308  Apr  7  2022  readme.txt                                                                         -r--   1          70  Apr  9  2022  robots.txt                                                                         dr-x  49       20480  Apr  8  2022  rome/                                                                              dr-x   3        4096  Apr  8  2022  searles-sav-on-propane/                                                            -r--   1         183  Apr  9  2022  sitemap.xml                                                                       http://162.250.19.7/                                                                        162.250.19.7[15:07][------] 
                                                                                                      Index of / (1/2) 
Index of /                                                                                                             
                                                                                                                       
 mode  links    bytes  last-changed  name                                                                              
                                                                                                                       
                                                                                                                       
   ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────   
                                                                                                                       
 dr-x  15        4096  Sep  1  2022  ./                                                                                
 dr-x   5        4096  Apr  7  2022  ../                                                                               
 -r--   1      454970  Sep  1  2022                                               2022-08-18 1403.eml                  
 -r--   1      185361  Aug 15  2022    ┌──────────── Exit ELinks ─────────────┐                                        
 dr-x  20        4096  Sep 16 01:46    │                                      │                                        
 -r--   1       26886  Jul 22  2022    │  Do you really want to exit ELinks?  │                                        
 dr-x   3        4096  Apr  8  2022    │                                      │                                        
 dr-x   2        4096  Oct 14 22:18    │           [ Yes ]  [ No ]            │                                        
 dr-x  12        4096  Sep 15 02:14    └──────────────────────────────────────┘                                        
 -r--   1         533  Apr  7  2022                                                                                    
 dr-x  13        4096  Jul  1 00:25  freedom/                                                                          
 -r--   1     6805716  Jul 22  2022  freedom.zip                                                                       
 dr-x   2        4096  Apr  8  2022  memes/                                                                            
 dr-x   3        4096  Apr  8  2022  music/                                                                            
 dr-x   3        4096  Oct 14 22:20  notices/                                                                          
 dr-x   5        4096  Oct  9 21:10  pictures/                                                                         
 -r--   1         308  Apr  7  2022  readme.txt                                                                        
 -r--   1          70  Apr  9  2022  robots.txt                                                                        
 dr-x  49       20480  Apr  8  2022  rome/                                                                             
 dr-x   3        4096  Apr  8  2022  searles-sav-on-propane/                                                           
http://162.250.19.7/freedom.zip                                                            162.250.19.7[15:25][------] 






pi@raspberrypi:~ $ 


#	This is the file I downloaded from elinks before I closed it and it was saved to my parent directory and it came up in the firefox browser so I just selected all and copied it here.   ### 665


Index of /

mode  links    bytes  last-changed  name
    dr-x  15        4096  Sep  1  2022  ./
dr-x   5        4096  Apr  7  2022  ../
-r--   1      454970  Sep  1  2022  Bug-Report-Pi-400--program_usb_boot_mode=1 - 2022-08-18 1403.eml
-r--   1      185361  Aug 15  2022  Bug-Report-Pi-400-2022-08-15.txt
dr-x  20        4096  Sep 16 01:46  ac0xl/
-r--   1       26886  Jul 22  2022  command-line-PATH-bug.txt
dr-x   3        4096  Apr  8  2022  delinquent-accounts/
dr-x   2        4096  Oct 14 22:18  documents/
dr-x  12        4096  Sep 15 02:14  downloads/
-r--   1         533  Apr  7  2022  favicon.ico
dr-x  13        4096  Jul  1 00:25  freedom/
-r--   1     6805716  Jul 22  2022  freedom.zip
dr-x   2        4096  Apr  8  2022  memes/
dr-x   3        4096  Apr  8  2022  music/
dr-x   3        4096  Oct 14 22:20  notices/
dr-x   5        4096  Oct  9 21:10  pictures/
-r--   1         308  Apr  7  2022  readme.txt
-r--   1          70  Apr  9  2022  robots.txt
dr-x  49       20480  Apr  8  2022  rome/
dr-x   3        4096  Apr  8  2022  searles-sav-on-propane/
-r--   1         183  Apr  9  2022  sitemap.xml
dr-x   2        4096  Apr  9  2022  va/
dr-x   8        4096  Aug 13  2022  videos/
    

#	This is the ls -al of my parent directory since I already had a copy of freedom.zip when it made another copy.   ### 696


ls -al ~/
total 13512
drwx------ 19 pi   pi      4096 Dec  9 15:33 .
drwxr-xr-x  3 root root    4096 Oct  9 22:09 ..
-rw-r--r--  1 pi   pi      2247 Dec  9 15:13 2023-12-09-elinks-test
-rw-------  1 pi   pi      6507 Dec  8 16:22 .bash_history
-rw-r--r--  1 pi   pi       220 Oct  9 21:39 .bash_logout
-rw-r--r--  1 pi   pi      3523 Oct  9 21:39 .bashrc
drwxr-xr-x  2 pi   pi      4096 Oct  9 21:49 Bookshelf
drwx------  6 pi   pi      4096 Dec  9 15:33 .cache
drwxr-xr-x 15 pi   pi      4096 Dec  7 16:59 .config
drwxr-xr-x  2 pi   pi      4096 Dec  7 16:59 Desktop
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09 Documents
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09 Downloads
drwx------  2 pi   pi      4096 Dec  9 15:25 .elinks
drwxr-xr-x  7 pi   pi      4096 Dec  9 14:59 freedom
-rw-r--r--  1 pi   pi   6805716 Dec  7 16:29 freedom.zip
-rw-r--r--  1 pi   pi   6805716 Dec  9 15:09 freedom.zip.1
-rw-------  1 pi   pi        20 Dec  8 13:38 .lesshst
drwxr-xr-x  4 pi   pi      4096 Oct  9 22:09 .local
drwx------  4 pi   pi      4096 Dec  9 15:33 .mozilla
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09 Music
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09 Pictures
drwx------  3 pi   pi      4096 Oct  9 22:10 .pp_backup
-rw-r--r--  1 pi   pi       807 Oct  9 21:39 .profile
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09 Public
-rw-r--r--  1 pi   pi         0 Oct  9 22:09 .sudo_as_admin_successful
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09 Templates
drwxr-xr-x  3 pi   pi      4096 Dec  9 13:22 thttpd
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09 Videos
-rw-------  1 pi   pi        56 Dec  8 16:23 .Xauthority
-rw-------  1 pi   pi     48494 Dec  9 15:36 .xsession-errors
-rw-------  1 pi   pi     51355 Dec  8 16:23 .xsession-errors.old
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ #	ls -al ~/  ### 735 This shows that freedom.zip is in the users home directory.   ### 735


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


cat ~/freedom/thttpd-PATH-change.txt   ### 741
thttpd-PATH-change.txt



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

#	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   ### 754

		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     ### 761

		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 768
#
#	Make your changes and then "control o" to write and "control x" to exit.
#
#		frank@frank-desktop:~$ 
#		frank@frank-desktop:~$ cat /etc/environment     ### 773
#		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 786
#
#	*****************************
#
#	When the computer comes back up, go to a terminal and enter:
#
#		frank@frank-desktop:~$ 
#		frank@frank-desktop:~$ $PATH     ### 793
#		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.   ### 801
#
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


frank@raspberrypi:~ $ $PATH     ### 807
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.   ### 811


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


frank@raspberrypi:/etc $ cat profile     ### 818
# /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     ### 856
frank@raspberrypi:/etc $ 



frank@raspberrypi:/etc $ cat profile     ### 861
# /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.   ### 901


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



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


frank@raspberrypi:~ $ $PATH     ### 910
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:~ $ 


#	*****************************   ### 915

pi@raspberrypi:~ $ 


pi@raspberrypi:~/freedom $ cd /etc   ### 920


pi@raspberrypi:/etc $ cat environment    ### 923


pi@raspberrypi:/etc $ cat profile   ### 926   This is the old "$PATH" that is showing!!!   ### 926
# /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
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ 


pi@raspberrypi:/etc $ sudo nano profile   ### 965 Making changes to the path!!!   ### 965
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ 


pi@raspberrypi:/etc $ cat profile   ### 970 Checking to see if everything is right!!!   ### 970
# /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
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ 


#	Make sure the path is right, one will need to reboot to make it active.   ### 1010


date   ### 1013
Sat Dec  9 04:28:12 PM MST 2023


reboot   ### 1017


pi@raspberrypi:~ $ date   ### 1020
Sat Dec  9 04:33:11 PM MST 2023
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ $PATH   ### 1023
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
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


#	*****************************   ### 1029


#	"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!   ### 1032

#	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!!!   ### 1034

#	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!*****   ### 1036


cat ~/freedom/thttpd-2.29-changes.txt   ### 1039
thttpd-2.29-changes.txt



#	*****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.
#
#
#
#	*****************************
#


#	Formatting media for the Raspberry Pi.   ### 1134

#	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.   ### 1136
#
#	For formatting drives greater than 512 GB, see: "2021-09-07-Formatting-Drives-Greater-Than-512GB.txt".   ### 1138
#
#
#	*****************************   ### 1141
#
#
#	Some packages that I added:
#
#	First run "sudo apt update" to make sure everything is up to date.
#

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


sudo apt install dochelp   ### 1161
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  dochelp
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 722 kB of archives.
After this operation, 3,001 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main arm64 dochelp arm64 0.1.8+b3 [722 kB]
Fetched 722 kB in 2s (293 kB/s)  
Selecting previously unselected package dochelp.
(Reading database ... 145048 files and directories currently installed.)
Preparing to unpack .../dochelp_0.1.8+b3_arm64.deb ...
Unpacking dochelp (0.1.8+b3) ...
Setting up dochelp (0.1.8+b3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
pi@raspberrypi:~ $ 


#	The old "Mousepad" text editor did not have a spell checker, so I added "Pluma" which seems to be about the same thing but with a spell checker! The new Mousepad text editor one can add the spell checker under Preferences then Plugins then select Spell Checking.   ### 1185


sudo apt install pluma   ### 1188
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gir1.2-gtksource-4 gir1.2-peas-1.0 gir1.2-pluma-1.0 pluma-common
The following NEW packages will be installed:
  gir1.2-gtksource-4 gir1.2-peas-1.0 gir1.2-pluma-1.0 pluma pluma-common
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,460 kB of archives.
After this operation, 28.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main arm64 gir1.2-gtksource-4 arm64 4.8.4-4 [19.9 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 gir1.2-peas-1.0 arm64 1.34.0-1+b1 [7,892 B]
Get:3 http://deb.debian.org/debian bookworm/main arm64 gir1.2-pluma-1.0 arm64 1.26.0-1 [33.7 kB]
Get:4 http://deb.debian.org/debian bookworm/main arm64 pluma-common all 1.26.0-1 [1,999 kB]
Get:5 http://deb.debian.org/debian bookworm/main arm64 pluma arm64 1.26.0-1 [400 kB]                               
Fetched 2,460 kB in 7s (330 kB/s)                                                                                  
Selecting previously unselected package gir1.2-gtksource-4:arm64.
(Reading database ... 145064 files and directories currently installed.)
Preparing to unpack .../gir1.2-gtksource-4_4.8.4-4_arm64.deb ...
Unpacking gir1.2-gtksource-4:arm64 (4.8.4-4) ...
Selecting previously unselected package gir1.2-peas-1.0:arm64.
Preparing to unpack .../gir1.2-peas-1.0_1.34.0-1+b1_arm64.deb ...
Unpacking gir1.2-peas-1.0:arm64 (1.34.0-1+b1) ...
Selecting previously unselected package gir1.2-pluma-1.0.
Preparing to unpack .../gir1.2-pluma-1.0_1.26.0-1_arm64.deb ...
Unpacking gir1.2-pluma-1.0 (1.26.0-1) ...
Selecting previously unselected package pluma-common.
Preparing to unpack .../pluma-common_1.26.0-1_all.deb ...
Unpacking pluma-common (1.26.0-1) ...
Selecting previously unselected package pluma.
Preparing to unpack .../pluma_1.26.0-1_arm64.deb ...
Unpacking pluma (1.26.0-1) ...
Setting up gir1.2-gtksource-4:arm64 (4.8.4-4) ...
Setting up gir1.2-pluma-1.0 (1.26.0-1) ...
Setting up gir1.2-peas-1.0:arm64 (1.34.0-1+b1) ...
Setting up pluma-common (1.26.0-1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for libglib2.0-0:arm64 (2.74.6-2) ...
Setting up pluma (1.26.0-1) ...
pi@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.   ### 1235

 
sudo apt install elinks elinks-doc tre-agrep     ### sudo - A text web browser for computers with little RAM.   ### 1238
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
elinks is already the newest version (0.13.2-1+b4).
elinks-doc is already the newest version (0.13.2-1).
tre-agrep is already the newest version (0.8.0-7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $ 


#	"ELinks" operates in a terminal window and it is a good idea to start it in its own new terminal! 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.   ### 1249
pi@raspberrypi:~ $ 
 
#	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"   ### 1252


df -H     ### 1255
Filesystem      Size  Used Avail Use% Mounted on
udev            1.8G     0  1.8G   0% /dev
tmpfs           398M  1.4M  397M   1% /run
/dev/mmcblk0p2   30G  5.1G   24G  18% /
tmpfs           2.0G  275k  2.0G   1% /dev/shm
tmpfs           5.3M   13k  5.3M   1% /run/lock
/dev/mmcblk0p1  535M   76M  459M  15% /boot/firmware
tmpfs           398M   46k  398M   1% /run/user/1000
pi@raspberrypi:~ $ 


date     ### 1267
Sat Dec  9 05:30:21 PM MST 2023
pi@raspberrypi:~ $ 


#	*****************************   ### 1272


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


#	*****************************
#	*****************************
#	*****************************   ### 1280


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


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


$PATH   ### 1291
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
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ cd /etc     ### 1296
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ cat group     ### (we are looking for a group "www") 1299
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:pi
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:pi
fax:x:21:
voice:x:22:
cdrom:x:24:pi
floppy:x:25:
tape:x:26:
sudo:x:27:pi
audio:x:29:pi,pulse
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
shadow:x:42:
utmp:x:43:
video:x:44:pi
sasl:x:45:
plugdev:x:46:pi
staff:x:50:
games:x:60:pi
users:x:100:pi
nogroup:x:65534:
systemd-journal:x:999:
systemd-network:x:998:
crontab:x:101:
input:x:102:pi
sgx:x:103:
kvm:x:104:
render:x:105:pi
netdev:x:106:pi
pi:x:1000:
systemd-timesync:x:997:
messagebus:x:107:
_ssh:x:108:
bluetooth:x:109:
avahi:x:110:
polkitd:x:996:
spi:x:995:pi
i2c:x:994:pi
gpio:x:993:pi
lightdm:x:111:
rtkit:x:112:
pipewire:x:113:
rdma:x:114:
lpadmin:x:115:root,pi
ssl-cert:x:116:
pulse:x:117:
pulse-access:x:118:
scanner:x:119:saned
saned:x:120:
colord:x:121:
pi@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.   ### 1370


pi@raspberrypi:/etc $ addgroup --help     ### 1373
adduser [--uid id] [--firstuid id] [--lastuid id]
        [--gid id] [--firstgid id] [--lastgid id] [--ingroup group]
        [--add-extra-groups] [--shell shell]
        [--comment comment] [--home dir] [--no-create-home]
        [--allow-all-names] [--allow-bad-names]
        [--disabled-password] [--disabled-login]
        [--conf file] [--quiet] [--verbose] [--debug]
        user
    Add a normal user

adduser --system
        [--uid id] [--group] [--ingroup group] [--gid id]
        [--shell shell] [--comment comment] [--home dir] [--no-create-home]
        [--conf file] [--quiet] [--verbose] [--debug]
        user
   Add a system user

adduser --group
        [--gid ID] [--firstgid id] [--lastgid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
addgroup
        [--gid ID] [--firstgid id] [--lastgid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
   Add a user group

addgroup --system
        [--gid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
   Add a system group

adduser USER GROUP
   Add an existing user to an existing group
pi@raspberrypi:/etc $ 


#	*****************************   ### 1412

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

#	*********

#    Add a system group   ### 1418

#	*********   ### 1420

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

#	*********   ### 1425

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


pi@raspberrypi:/etc $ sudo addgroup --system www     ### sudo 1430
Adding group `www' (GID 122) ...
Done.
pi@raspberrypi:/etc $ 


#	*********   ### 1436


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


#	**************   ### 1445


pi@raspberrypi:/etc $ cat group     ### 1448
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:pi
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:pi
fax:x:21:
voice:x:22:
cdrom:x:24:pi
floppy:x:25:
tape:x:26:
sudo:x:27:pi
audio:x:29:pi,pulse
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
shadow:x:42:
utmp:x:43:
video:x:44:pi
sasl:x:45:
plugdev:x:46:pi
staff:x:50:
games:x:60:pi
users:x:100:pi
nogroup:x:65534:
systemd-journal:x:999:
systemd-network:x:998:
crontab:x:101:
input:x:102:pi
sgx:x:103:
kvm:x:104:
render:x:105:pi
netdev:x:106:pi
pi:x:1000:
systemd-timesync:x:997:
messagebus:x:107:
_ssh:x:108:
bluetooth:x:109:
avahi:x:110:
polkitd:x:996:
spi:x:995:pi
i2c:x:994:pi
gpio:x:993:pi
lightdm:x:111:
rtkit:x:112:
pipewire:x:113:
rdma:x:114:
lpadmin:x:115:root,pi
ssl-cert:x:116:
pulse:x:117:
pulse-access:x:118:
scanner:x:119:saned
saned:x:120:
colord:x:121:
www:x:122:pi
pi@raspberrypi:/etc $ 


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


#	*****************************   ### 1523


#	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!   ### 1526


#	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.)   ### 1529



pi@raspberrypi:/etc $ cd ~/freedom/Acme.com/thttpd-2.29     ### 1533
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 
pi@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"   ### 1538
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 


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


pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ cat install.txt   ### 1553
install.txt

# 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
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 

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


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


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



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


pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ date     ### 1590
Sat Dec  9 06:16:51 PM MST 2023
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 


pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ make clean     ### Step one. 1596
for i in cgi-src extras ; do ( \
    cd $i ; \
    pwd ; \
    make  clean \
) ; done
/home/pi/freedom/Acme.com/thttpd-2.29/cgi-src
make[1]: Entering directory '/home/pi/freedom/Acme.com/thttpd-2.29/cgi-src'
rm -f *.o redirect ssi phf
make[1]: Leaving directory '/home/pi/freedom/Acme.com/thttpd-2.29/cgi-src'
/home/pi/freedom/Acme.com/thttpd-2.29/extras
make[1]: Entering directory '/home/pi/freedom/Acme.com/thttpd-2.29/extras'
rm -f *.o makeweb htpasswd
make[1]: Leaving directory '/home/pi/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
pi@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.  ### 1614



#	*************** 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.  ### 1618

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!   ### 1620

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



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


fpi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ ./configure     ### Step two. 1629
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
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 


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

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

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



pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ make     ### Step three. 1702
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
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/pi/freedom/Acme.com/thttpd-2.29/cgi-src
make[1]: Entering directory '/home/pi/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
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/pi/freedom/Acme.com/thttpd-2.29/cgi-src'
/home/pi/freedom/Acme.com/thttpd-2.29/extras
make[1]: Entering directory '/home/pi/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/pi/freedom/Acme.com/thttpd-2.29/extras'
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 



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


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


pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ sudo make install     ### sudo  Step four. 1764
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/pi/freedom/Acme.com/thttpd-2.29/cgi-src
make[1]: Entering directory '/home/pi/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/pi/freedom/Acme.com/thttpd-2.29/cgi-src'
/home/pi/freedom/Acme.com/thttpd-2.29/extras
make[1]: Entering directory '/home/pi/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/pi/freedom/Acme.com/thttpd-2.29/extras'
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 


pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ date     ### 1812
Sat Dec  9 06:39:17 PM MST 2023
pi@raspberrypi:~/freedom/Acme.com/thttpd-2.29 $ 


#	*****************************  ### 1817


#	### "thttpd" is now installed. 1820


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


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


pi@raspberrypi:/home/local/www $ ls -al     ### 1831
total 12
drwxr-xr-x 3 root root 4096 Dec  9 18:36 .
drwxr-xr-x 5 root root 4096 Dec  9 18:36 ..
drwxr-xr-x 2 root root 4096 Dec  9 18:36 cgi-bin
pi@raspberrypi:/home/local/www $ 


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


pi@raspberrypi:/home/local/www $ ls -al     ### 1845
total 20
drwxr-xr-x 5 root root 4096 Dec  9 18:48 .
drwxr-xr-x 5 root root 4096 Dec  9 18:36 ..
drwxr-xr-x 2 root root 4096 Dec  9 18:36 cgi-bin
drwxr-xr-x 2 root root 4096 Dec  9 18:48 logs
drwxr-xr-x 2 root root 4096 Dec  9 18:48 users
pi@raspberrypi:/home/local/www $ 


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

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


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


pi@raspberrypi:/home/local/www $ ls -al     ### 1865
total 20
drwxr-xr-x 5 root root 4096 Dec  9 18:48 .
drwxr-xr-x 5 root root 4096 Dec  9 18:36 ..
drwxr-xr-x 2 root root 4096 Dec  9 18:36 cgi-bin
drwxr-xr-x 2 root root 4096 Dec  9 18:48 logs
drwxrwxr-x 2 root root 4096 Dec  9 18:48 users
pi@raspberrypi:/home/local/www $ 

#	Make sure users is now 0775 (drwxrwxr-x). 1874


#	*******************  ### 1877


#	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".  ### 1880


pi@raspberrypi:/home/local/www $ cd ../     ### 1883
pi@raspberrypi:/home/local $ 
pi@raspberrypi:/home/local $ 


pi@raspberrypi:/home/local $ sudo chown -vR root:www www     ### sudo 1888
changed ownership of 'www/logs' 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/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' from root:root to root:www
changed ownership of 'www/users' from root:root to root:www
changed ownership of 'www' from root:root to root:www
pi@raspberrypi:/home/local $ 


pi@raspberrypi:/home/local $ ls -al     ### 1899
total 20
drwxr-xr-x 5 root root 4096 Dec  9 18:36 .
drwxr-xr-x 4 root root 4096 Dec  9 18:36 ..
drwxr-xr-x 4 root root 4096 Dec  9 18:36 man
drwxr-xr-x 2 root root 4096 Dec  9 18:36 sbin
drwxr-xr-x 5 root www  4096 Dec  9 18:48 www
pi@raspberrypi:/home/local $ 


#	*********  ### 1909


#	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.  ### 1912


pi@raspberrypi:/home/local $ cd     ### 1915             
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ addgroup --help     ### 1920
adduser [--uid id] [--firstuid id] [--lastuid id]
        [--gid id] [--firstgid id] [--lastgid id] [--ingroup group]
        [--add-extra-groups] [--shell shell]
        [--comment comment] [--home dir] [--no-create-home]
        [--allow-all-names] [--allow-bad-names]
        [--disabled-password] [--disabled-login]
        [--conf file] [--quiet] [--verbose] [--debug]
        user
    Add a normal user

adduser --system
        [--uid id] [--group] [--ingroup group] [--gid id]
        [--shell shell] [--comment comment] [--home dir] [--no-create-home]
        [--conf file] [--quiet] [--verbose] [--debug]
        user
   Add a system user

adduser --group
        [--gid ID] [--firstgid id] [--lastgid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
addgroup
        [--gid ID] [--firstgid id] [--lastgid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
   Add a user group

addgroup --system
        [--gid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
   Add a system group

adduser USER GROUP
   Add an existing user to an existing group
pi@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.  ### 1960

#	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.  ### 1962


pi@raspberrypi:~ $ sudo adduser --add_extra_groups a0     ### sudo 1965
Adding user `a0' ...
Adding new group `a0' (1001) ...
Adding new user `a0' (1001) with group `a0 (1001)' ...
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 supplemental / extra groups `users, users' ...
Adding user `a0' to group `users' ...
adduser: The user `a0' is already a member of `users'.
pi@raspberrypi:~ $ 


#	adduser USER GROUP  ### 1988

#	   Add an existing user to an existing group  ### 1990

# 	Again this would be the "a0".  ### 1992


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


pi@raspberrypi:~ $ su a0     ### Change to user "a0" 2001
Password: 
a0@raspberrypi:/home/pi $ 


a0@raspberrypi:/home/pi $ #     here we are still in "/home/pi", and the user is now "a0".  ### 2006


a0@raspberrypi:/home/pi $ cd     ### Change to the "a0" home directory, NOTE the "~".   ### 2009
a0@raspberrypi:~ $ 
a0@raspberrypi:~ $ 


a0@raspberrypi:~ $ ls -al     ### 2014
total 28
drwx------ 2 a0   a0   4096 Dec  9 19:15 .
drwxr-xr-x 5 root root 4096 Dec  9 19:15 ..
-rw-r--r-- 1 a0   a0    220 Dec  9 19:15 .bash_logout
-rw-r--r-- 1 a0   a0   3523 Dec  9 19:15 .bashrc
-rw-r--r-- 1 a0   a0   5290 Dec  9 19:15 .face
lrwxrwxrwx 1 a0   a0      5 Dec  9 19:15 .face.icon -> .face
-rw-r--r-- 1 a0   a0    807 Dec  9 19:15 .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.   ### 2026
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)?  ### 2030


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


a0@raspberrypi:~ $ ls -al     ### 2039
total 28
drwx------ 2 a0   a0   4096 Dec  9 19:38 .
drwxr-xr-x 5 root root 4096 Dec  9 19:15 ..
-rw-r--r-- 1 a0   a0      0 Dec  9 19:35 .1001
-rw-r--r-- 1 a0   a0    220 Dec  9 19:15 .bash_logout
-rw-r--r-- 1 a0   a0   3523 Dec  9 19:15 .bashrc
-rw-r--r-- 1 a0   a0   5290 Dec  9 19:15 .face
lrwxrwxrwx 1 a0   a0      5 Dec  9 19:15 .face.icon -> .face
-rw-r--r-- 1 a0   a0    807 Dec  9 19:15 .profile
lrwxrwxrwx 1 a0   www    24 Dec  9 19:38 public_html -> /home/local/www/users/a0
a0@raspberrypi:~ $ 


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


pi@raspberrypi:~ $ cat /etc/group     ### 2059
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:pi
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:pi
fax:x:21:
voice:x:22:
cdrom:x:24:pi
floppy:x:25:
tape:x:26:
sudo:x:27:pi
audio:x:29:pi,pulse
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
shadow:x:42:
utmp:x:43:
video:x:44:pi
sasl:x:45:
plugdev:x:46:pi
staff:x:50:
games:x:60:pi
users:x:100:pi,a0
nogroup:x:65534:
systemd-journal:x:999:
systemd-network:x:998:
crontab:x:101:
input:x:102:pi
sgx:x:103:
kvm:x:104:
render:x:105:pi
netdev:x:106:pi
pi:x:1000:
systemd-timesync:x:997:
messagebus:x:107:
_ssh:x:108:
bluetooth:x:109:
avahi:x:110:
polkitd:x:996:
spi:x:995:pi
i2c:x:994:pi
gpio:x:993:pi
lightdm:x:111:
rtkit:x:112:
pipewire:x:113:
rdma:x:114:
lpadmin:x:115:root,pi
ssl-cert:x:116:
pulse:x:117:
pulse-access:x:118:
scanner:x:119:saned
saned:x:120:
colord:x:121:
www:x:122:pi,a0
a0:x:1001:
pi@raspberrypi:~ $ 


#	**************  ### 2132


pi@raspberrypi:~ $ cd /home   ### 2135
pi@raspberrypi:/home $ 
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ ls -al   ### 2140
total 20
drwxr-xr-x  5 root root 4096 Dec  9 19:15 .
drwxr-xr-x 18 root root 4096 Dec  7 15:12 ..
drwx------  2 a0   a0   4096 Dec  9 19:41 a0
drwxr-xr-x  5 root root 4096 Dec  9 18:36 local
drwx------ 19 pi   pi   4096 Dec  9 16:32 pi
pi@raspberrypi:/home $ 


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


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


pi@raspberrypi:/home $ ls -al     ### 2166
total 20
drwxr-xr-x  5 root root 4096 Dec  9 19:15 .
drwxr-xr-x 18 root root 4096 Dec  7 15:12 ..
drwx------  2 a0   www  4096 Dec  9 19:41 a0
drwxr-xr-x  5 root root 4096 Dec  9 18:36 local
drwx------ 19 pi   pi   4096 Dec  9 16:32 pi
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ cd /home/local/www/users     ### 2176
pi@raspberrypi:/home/local/www/users $ 
pi@raspberrypi:/home/local/www/users $ 


pi@raspberrypi:/home/local/www/users $ ls -al     ### 2181
total 12
drwxrwxr-x 3 root www 4096 Dec  9 19:38 .
drwxr-xr-x 5 root www 4096 Dec  9 18:48 ..
drwxr-xr-x 2 a0   a0  4096 Dec  9 19:38 a0
pi@raspberrypi:/home/local/www/users $ 


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


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


pi@raspberrypi:/home/local/www/users $ ls -al   ### 2198
total 12
drwxrwxr-x 3 root www 4096 Dec  9 19:38 .
drwxr-xr-x 5 root www 4096 Dec  9 18:48 ..
drwxr-xr-x 2 a0   www 4096 Dec  9 19:38 a0
pi@raspberrypi:/home/local/www/users $ 


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


pi@raspberrypi:/home/local/www/users $ date   ### 2209
Sat Dec  9 08:02:39 PM MST 2023
pi@raspberrypi:/home/local/www/users $ 


#	*****************************  ### 2214


#	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.  ### 2217


#	*****   ### 2220


pi@raspberrypi:/home/local/www/users $ cd /home/local/sbin     ### 2223
pi@raspberrypi:/home/local/sbin $ 
pi@raspberrypi:/home/local/sbin $ 


pi@raspberrypi:/home/local/sbin $ ls -al     ### 2228
total 176
drwxr-xr-x 2 root root   4096 Dec  9 18:36 .
drwxr-xr-x 5 root root   4096 Dec  9 18:36 ..
-rwxr-xr-x 1 root root  72280 Dec  9 18:36 htpasswd
-rwxr-sr-x 1 root www   71464 Dec  9 18:36 makeweb
-r-xr-xr-x 1 root root   2878 Dec  9 18:36 syslogtocern
-r-xr-xr-x 1 bin  bin  157800 Dec  9 18:36 thttpd
pi@raspberrypi:/home/local/sbin $ 


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


pi@raspberrypi:~/freedom $ ls -al     ### 2244
total 792
drwxr-xr-x  7 pi pi   4096 Dec  9 20:10  .
drwx------ 19 pi pi   4096 Dec  9 16:32  ..
-r--r--r--  1 pi pi  32014 Jan  8  2020  2010Website.pdf
-r--r--r--  1 pi pi  11024 Jan  8  2020  2019-09-05-Project.txt
-r--r--r--  1 pi pi  11941 Jan  8  2020  2019-10-01-website.txt
-r--r--r--  1 pi pi   6365 Jan  8  2020  2019-11-26-web-server.txt
-r--r--r--  1 pi pi  21340 Jan  8  2020  2019-12-06-Google-Search-Is-Broken.txt
-r--r--r--  1 pi pi  12817 Jun 14  2022  2020-07-17-thttpd.txt
-r--r--r--  1 pi pi  17955 Sep 10  2021  2021-09-01.txt
-r--r--r--  1 pi pi  18393 Sep 11  2021  2021-09-07-Formatting-Drives-Greater-Than-512GB.txt
-rw-r--r--  1 pi pi 110259 Dec  9 20:10  2023-12-09-new-Pi-OS-thttpd-build.txt
-rw-r--r--  1 pi pi 109654 Dec  9 20:06  2023-12-09-new-Pi-OS-thttpd-build.txt~
drwxr-xr-x 22 pi pi   4096 Jul 12  2022  Acme.com
-rw-r--r--  1 pi pi  26886 Jul 22  2022  command-line-PATH-bug.txt
-r--r--r--  1 pi pi  26886 Jul 22  2022  command-line-PATH-bug.txt~
-r--r--r--  1 pi pi   1474 Dec  8 14:02  copy-log-files.txt
-r--r--r--  1 pi pi   1099 Dec  8 13:48  crontab.txt
drwxr-xr-x  4 pi pi   4096 Jul 12  2022 'HTML Sampler_files'
-r--r--r--  1 pi pi  26907 Aug 16  2021 'HTML Sampler.html'
-r--r--r--  1 pi pi    486 Dec  7 13:25  install.txt
-rw-r--r--  1 pi pi     85 Jun  7  2022  list.txt
drwxr-xr-x  2 pi pi   4096 Jul 12  2022  os-debug
-r--r--r--  1 pi pi   4764 Jul 15  2022  Raspberry-Pi-wget-web-server-transfer-rates.txt
-r--r--r--  1 pi pi  75550 Jul 21  2022  readme.txt
-r--r--r--  1 pi pi  75550 Jul 21  2022  readme.txt~
-r--r--r--  1 pi pi  80728 Sep  8  2021  rfc3875-CGI.txt
-r--r--r--  1 pi pi   4369 Dec  8 14:57  router-setup.txt
-r--r--r--  1 pi pi    186 Jan  8  2020  sitemap.xml
-r--r--r--  1 pi pi    186 Jan  8  2020  sitemap.xml.txt
-r--r--r--  1 pi pi   3031 Dec  8 13:08  thttpd-2.29-changes.txt
-rwxr-xr--  1 pi pi    501 Jun  7  2022  thttpd_config
-r-xr-xr--  1 pi pi    501 Jun  7  2022  thttpd_config~
drwxr-xr-x  3 pi pi   4096 Jul 12  2022  thttpd-extras
-r--r--r--  1 pi pi  27291 Jul 21  2022  thttpd-man-page.txt
-r--r--r--  1 pi pi   5211 Dec  9 16:03  thttpd-PATH-change.txt
drwxr-xr-x  4 pi pi   4096 Jul 12  2022  vhost-DN-test
pi@raspberrypi:~/freedom $ 


pi@raspberrypi:~/freedom $ sudo cp -av thttpd-extras /home/local/sbin/   ### sudo 2285
'thttpd-extras' -> '/home/local/sbin/thttpd-extras'
'thttpd-extras/sitemap.xml' -> '/home/local/sbin/thttpd-extras/sitemap.xml'
'thttpd-extras/thttpd-rotate' -> '/home/local/sbin/thttpd-extras/thttpd-rotate'
'thttpd-extras/thttpd_wrapper~' -> '/home/local/sbin/thttpd-extras/thttpd_wrapper~'
'thttpd-extras/readme.txt' -> '/home/local/sbin/thttpd-extras/readme.txt'
'thttpd-extras/favicon.ico' -> '/home/local/sbin/thttpd-extras/favicon.ico'
'thttpd-extras/vhost-DN-test' -> '/home/local/sbin/thttpd-extras/vhost-DN-test'
'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'
'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/a0/test' -> '/home/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128/a0/test'
'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/robots.txt' -> '/home/local/sbin/thttpd-extras/robots.txt'
'thttpd-extras/anvil_thttpd.gif' -> '/home/local/sbin/thttpd-extras/anvil_thttpd.gif'
'thttpd-extras/thttpd_config~' -> '/home/local/sbin/thttpd-extras/thttpd_config~'
'thttpd-extras/thttpd_wrapper' -> '/home/local/sbin/thttpd-extras/thttpd_wrapper'
'thttpd-extras/rc.local' -> '/home/local/sbin/thttpd-extras/rc.local'
'thttpd-extras/sitemap.xml.txt' -> '/home/local/sbin/thttpd-extras/sitemap.xml.txt'
'thttpd-extras/thttpd.sh~' -> '/home/local/sbin/thttpd-extras/thttpd.sh~'
'thttpd-extras/rc.local~' -> '/home/local/sbin/thttpd-extras/rc.local~'
'thttpd-extras/thttpd.sh' -> '/home/local/sbin/thttpd-extras/thttpd.sh'
'thttpd-extras/thttpd-rotate~' -> '/home/local/sbin/thttpd-extras/thttpd-rotate~'
'thttpd-extras/robots-site.txt' -> '/home/local/sbin/thttpd-extras/robots-site.txt'
'thttpd-extras/thttpd_config' -> '/home/local/sbin/thttpd-extras/thttpd_config'
pi@raspberrypi:~/freedom $ 


pi@raspberrypi:~/freedom $ sudo cp -av os-debug /home/local/sbin/     ### sudo 2314
'os-debug' -> '/home/local/sbin/os-debug'
'os-debug/readme.txt~' -> '/home/local/sbin/os-debug/readme.txt~'
'os-debug/thttpd-rotate' -> '/home/local/sbin/os-debug/thttpd-rotate'
'os-debug/thttpd_wrapper~' -> '/home/local/sbin/os-debug/thttpd_wrapper~'
'os-debug/dead-thttpd' -> '/home/local/sbin/os-debug/dead-thttpd'
'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_wrapper' -> '/home/local/sbin/os-debug/thttpd_wrapper'
'os-debug/datelog~' -> '/home/local/sbin/os-debug/datelog~'
'os-debug/thttpd-rotate~' -> '/home/local/sbin/os-debug/thttpd-rotate~'
'os-debug/datelog' -> '/home/local/sbin/os-debug/datelog'
pi@raspberrypi:~/freedom $ 


pi@raspberrypi:~/freedom $ cd /home/local/sbin/thttpd-extras   ### 2329
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


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


pi@raspberrypi:/home/local/sbin/thttpd-extras $ cat /etc/rc.local   ### 2359
#!/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
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


pi@raspberrypi:/home/local/sbin/thttpd-extras $ cat rc.local   ### 2383
#!/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
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


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


pi@raspberrypi:/home/local/sbin/thttpd-extras $ ls -l /etc/rc.local   ### 2417
-rwxr-xr-- 1 pi pi 485 Aug 31  2021 /etc/rc.local
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 

#	(rc.local is still 0754)   ### 2421


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


pi@raspberrypi:/home/local/sbin/thttpd-extras $ ls -l /etc/thttpd.sh   ### 2429
-rwxr-xr-- 1 pi pi 136 Apr 22  2022 /etc/thttpd.sh
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 

#	(thttpd.sh is still 0754)   ### 2433


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

if [ -x /home/local/sbin/thttpd_wrapper ] ; then
	echo " thttpd "
	/home/local/sbin/thttpd_wrapper &
fi
#
exit 0
pi@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   ### 2449


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


pi@raspberrypi:/home/local/sbin/thttpd-extras $ ls -l /home/local/sbin   ### 2457
total 180
-rwxr-xr-x 1 root root  72280 Dec  9 18:36 htpasswd
-rwxr-sr-x 1 root www   71464 Dec  9 18:36 makeweb
drwxr-xr-x 2 pi   pi     4096 Jul 12  2022 os-debug
-r-xr-xr-x 1 root root   2878 Dec  9 18:36 syslogtocern
-r-xr-xr-x 1 bin  bin  157800 Dec  9 18:36 thttpd
drwxr-xr-x 3 pi   pi     4096 Jul 12  2022 thttpd-extras
-rwxr-xr-- 1 pi   pi      122 Aug 31  2021 thttpd_wrapper
pi@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!  ### 2469


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

while true ; do
	/home/local/sbin/thttpd -D -C /home/local/www/thttpd_config
	sleep 10
done
#
pi@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"  ### 2484


pi@raspberrypi:/home/local/sbin/thttpd-extras $ cat ~/freedom/crontab.txt   ### 2487
crontab.txt



# /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 )
#
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


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


pi@raspberrypi:/home/local/sbin/thttpd-extras $ ls -al /etc/cron.daily   ### 2522
total 40
drwxr-xr-x   2 root root  4096 Dec  9 20:43 .
drwxr-xr-x 129 root root 12288 Dec  9 20:28 ..
-rwxr-xr-x   1 root root  1478 May 25  2023 apt-compat
-rwxr-xr-x   1 root root   123 Mar 26  2023 dpkg
-rwxr-xr-x   1 root root   377 Dec 14  2022 logrotate
-rwxr-xr-x   1 root root  1395 Mar 12  2023 man-db
-rw-r--r--   1 root root   102 Mar  2  2023 .placeholder
-rwxr-xr--   1 pi   pi    1746 Aug 31  2021 thttpd-rotate
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 

#	(thttpd_rotate is still 0754)   ### 2534


#	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.  ### 2537


pi@raspberrypi:/home/local/sbin/thttpd-extras $ cat thttpd-rotate   ### 2540
#!/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`
#
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


pi@raspberrypi:/home/local/sbin/thttpd-extras $ cat ~/freedom/copy-log-files.txt   ### 2609
copy-log-files.txt

#	*********  ###  3


#	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).


#	*********  ### 25

pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


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


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


pi@raspberrypi:/home/local/sbin/thttpd-extras $ ls -al /home/local/www/   ### 2648
total 28
drwxr-xr-x 5 root www  4096 Dec  9 20:52 .
drwxr-xr-x 5 root root 4096 Dec  9 18:36 ..
drwxr-xr-x 2 root www  4096 Dec  9 18:36 cgi-bin
drwxr-xr-x 2 root www  4096 Dec  9 18:48 logs
-rwxr-xr-- 1 pi   pi    501 Jun  7  2022 thttpd_config
-r-xr-xr-- 1 pi   pi    501 Jun  7  2022 thttpd_config~
drwxrwxr-x 3 root www  4096 Dec  9 19:38 users
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


pi@raspberrypi:/home/local/sbin/thttpd-extras $ cat thttpd_config   ### 2660
# /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/sbin/thttpd-extras $ 


#	*****************************  ### 2677

#	*****************************  ### 2679

#		TESTING: 2681


pi@raspberrypi:/home/local/sbin/thttpd-extras $ date   ### 2684
Sat Dec  9 08:59:41 PM MST 2023
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


pi@raspberrypi:/home/local/sbin/thttpd-extras $ cd ../   ### 2689
pi@raspberrypi:/home/local/sbin $ 
pi@raspberrypi:/home/local/sbin $ 


#	We need the line from thttpd_wrapper without the wrapper.  ### 2694


pi@raspberrypi:/home/local/sbin $ cat thttpd_wrapper   ### 2697
#!/bin/sh
# thttpd_wrapper

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


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


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.   ### 2712


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


		#	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.   ### 2718


date   ### 2721
Sat Dec  9 09:15:15 PM MST 2023
pi@raspberrypi:~ $ 


sudo /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config     ### sudo  *** Terminal will lock up ***   ### 2726
 
#	At this point the new terminal will be locked up!   ### 2728
#	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.   ### 2729


#	On another new terminal enter: "ps -e" on the terminal and look for two lines: the first will be "sudo" and the next will be "thttpd", (for some reason I am getting two "sudo" lines and then the "thttpd" line.) if they are not there, save everything to this point and restart the computer. At this point run "ps -e" in a terminal and look for two lines that should be close together: "thttpd_wrapper", and "thttpd".   ### 2732

#	*********************  ### 2734

#	On another new terminal for elinks, (you will want to kill the tab and not the whole terminal):  ### 2736

#    Hopefully you installed ELinks! If you did, in the second new 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.  ### 2738

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


#	*********************  ### 2743

elinks http://localhost/     ### 2745

pi@raspberrypi:~ $ cat
line-2745-localhost-test.txt   ### 1


pi@raspberrypi:~ $ #    On another new terminal for elinks, (you will want to kill the tab and not the whole terminal):  ### 2736
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ #    Hopefully you installed ELinks! If you did, in the second new 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.  ### 2738
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ #    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.  ### 2740
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ #    *********************  ### 2743
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ elinks http://localhost/     ### 2745

                                                                     Index of / 
Index of /                                                                      
                                                                                
 mode  links    bytes  last-changed  name                                       
                                                                                
                                                                                
   ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ   
                                                                                
 dr-x   3                                                                       
 dr-x   5           âââââââââââââ Exit ELinks ââââââââââââââ                                      â                    
                    â  Do you really want to exit ELinks?  â                    
                    â                                      â                    
                    â           [ Yes ]  [ No ]            â                    
pi@raspberrypi:~ $ 


###   ***********************   ### 2777


#	Everything should be working at this point. Test one OK.  ### 2780


#	### On a third new terminal, 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.  ### 2783


 ps -e
    PID TTY          TIME CMD
      1 ?        00:00:03 systemd
      2 ?        00:00:00 kthreadd
      3 ?        00:00:00 rcu_gp
#	skiping many lines!
   9139 ?        00:00:00 kworker/2:0H
   9357 ?        00:00:00 kworker/0:3
   9403 ?        00:00:00 kworker/1:3
   9418 pts/1    00:00:00 sudo
   9419 pts/2    00:00:00 sudo
   9420 pts/2    00:00:00 thttpd
   9424 ?        00:00:00 kworker/1:2H
   9441 pts/3    00:00:00 ps

pi@raspberrypi:~ $ ps p 9418 9419 9420
    PID TTY      STAT   TIME COMMAND
   9418 pts/1    S+     0:00 sudo /home/local/sbin/thttpd -D -C /home/local/www/thttpd_con
   9419 pts/2    Ss     0:00 sudo /home/local/sbin/thttpd -D -C /home/local/www/thttpd_con
   9420 pts/2    S+     0:37 /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ # I do not know why I am getting two "sudo" lines but both need to be killed   ### 2807


pi@raspberrypi:~ $ sudo kill 9418 9419 9420
pi@raspberrypi:~ $ sudo kill 9418 9419 9420
kill: (9418): No such process
kill: (9419): No such process
kill: (9420): No such process
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


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

date     ### 2821
Wed Dec 13 04:42:35 PM MST 2023


pi@raspberrypi:~ $ cd /home/local/www/logs     ### 2825
pi@raspberrypi:/home/local/www/logs $ 


pi@raspberrypi:/home/local/www/logs $ ls -al     ### 2829
total 12
drwxr-xr-x 2 root   www     4096 Dec  9 21:59 .
drwxr-xr-x 5 root   www     4096 Dec  9 20:52 ..
-rw-r--r-- 1 nobody nogroup  584 Dec 13 15:46 thttpd_log
pi@raspberrypi:/home/local/www/logs $ 


pi@raspberrypi:/home/local/www/logs $ cat *log     ### 2837
::1 - - [13/Dec/2023:21:18:38 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:21:18:42 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:37 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:41 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
pi@raspberrypi:/home/local/www/logs $ 


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


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


pi@raspberrypi:/home/local/www/logs $ cd /home/local/sbin/thttpd-extras/     ### 2853
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


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


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


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


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


pi@raspberrypi:/home/local/sbin/thttpd-extras $ sudo ls -al /home/local/www/users/   ### sudo 2898
total 24
drwxrwxr-x 3 root www 4096 Dec 13 17:06 .
drwxr-xr-x 5 root www 4096 Dec  9 20:52 ..
drwxr-xr-x 2 a0   www 4096 Dec  9 19:38 a0
-rw-r--r-- 1 pi   pi   533 Jan  8  2020 favicon.ico
-rw-r--r-- 1 pi   pi   308 Aug 13  2021 readme.txt
-rw-r--r-- 1 pi   pi    27 Jan  8  2020 robots.txt
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


pi@raspberrypi:/home/local/sbin/thttpd-extras $ date   ### 2909
Wed Dec 13 05:10:08 PM MST 2023
pi@raspberrypi:/home/local/sbin/thttpd-extras $ 


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


pi@raspberrypi:/home/local/sbin/thttpd-extras $ cat sitemap.xml   ### 2921
<?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>
pi@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  ### 2936

#	*******************  ### 2938

pi@raspberrypi:/home/local/sbin/thttpd-extras $ cd /etc     ### 2940
pi@raspberrypi:/etc $ 
pi@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. ****  ### 2945


pi@raspberrypi:/etc $ date   ### 2948
Wed Dec 13 05:18:27 PM MST 2023
pi@raspberrypi:/etc $ 


pi@raspberrypi:/etc $ sudo ./rc.local   ### sudo (Starting thttpd from rc.local, REMEMBER the sudo!!!!!!)   ### 2953
My IP address is 192.168.1.188 
Starting thttpd. 

 thttpd 
pi@raspberrypi:/etc $ 

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

#	Here we see that my local IP Address is 192.168.1.188 and thttpd has started and is now running. So we will see if this IP Addresses will get to my web site.


#	Use a separate terminal for "elinks".   ### 2965

elinks 192.168.1.188   ### 2967


cat ~/freedom/line-2967-site-192.168.1.188.txt

pi@raspberrypi:~ $ elinks 192.168.1.188   ### 2967

                                                          http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a g
*                                                                                         
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
OK                                                    192.168.1.188[Dec 13 17:31][------] 
                                                           http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a gr
*                                                                                          
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
OK                                                     192.168.1.188[Dec 13 17:31][------] 
                                                            http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a gre
*                                                                                           
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
OK                                                      192.168.1.188[Dec 13 17:31][------] 
                                                              http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green
*                                                                                             
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
OK                                                        192.168.1.188[Dec 13 17:31][------] 
                                                               http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green 
*                                                                                              
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
OK                                                         192.168.1.188[Dec 13 17:31][------] 
                                                                http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green s
*                                                                                               
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
OK                                                          192.168.1.188[Dec 13 17:31][------] 
                                                                 http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green sc
*                                                                                                
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
OK                                                           192.168.1.188[Dec 13 17:31][------] 
                                                                  http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green    
screen with the files listed much like a directory page, or an ftp site. All one has to do is     
click on the file or directory name and it will open! Clicking the two dots (../) will take one   
back up one level.                                                                                
*                                                                                                 
                                                                                                  
                                                                                                  
                                                                                                  
                             ┌──────────── Exit ELinks ─────────────┐                             
                             │                                      │                             
                             │  Do you really want to exit ELinks?  │                             
                             │                                      │                             
                             │           [ Yes ]  [ No ]            │                             
                             └──────────────────────────────────────┘                             
                                                                                                  
                                                                                                  
                                                                                                  
                                                                                                  
                                                                                                  
                                                                                                  
                                                                                                  
                                                                                                  
OK                                                            192.168.1.188[Dec 13 17:32][------] 

pi@raspberrypi:~ $ cat ~/freedom/line-2967-site-192.168.1.188.txt
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

  <head>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
    <title>Index of /</title>
  </head>

  <body bgcolor="#99cc99" text="#000000" link="#2020ff" vlink="#4040cc">

    <h2>Index of /</h2>

    <pre>
mode  links    bytes  last-changed  name
    <hr>dr-x   3        4096  Dec 14 00:06  <a href="/./">.</a>/
dr-x   5        4096  Dec 10 03:52  <a href="/../">..</a>/
dr-x   2        4096  Dec 10 02:38  <a href="/a0/">a0</a>/
-r--   1         533  Jan  9  2020  <a href="/favicon.ico">favicon.ico</a>
-r--   1         308  Aug 14  2021  <a href="/readme.txt">readme.txt</a>
-r--   1          27  Jan  9  2020  <a href="/robots.txt">robots.txt</a>
    </pre>
  </body>
</html>


(from the terminal above where the tab closed).

pi@raspberrypi:~ $ elinks 192.168.1.188     ### 2967

                                                          http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a g
*                                                                                         
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
                                                                                          
OK                                                    192.168.1.188[Dec 13 17:31][------] 
                                                           http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a gr
*                                                                                          
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
OK                                                     192.168.1.188[Dec 13 17:31][------] 
                                                            http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a gre
*                                                                                           
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
                                                                                            
OK                                                      192.168.1.188[Dec 13 17:31][------] 
                                                              http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green
*                                                                                             
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
OK                                                        192.168.1.188[Dec 13 17:31][------] 
                                                               http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green 
*                                                                                              
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
                                                                                               
OK                                                         192.168.1.188[Dec 13 17:31][------] 
                                                                http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green s
*                                                                                               
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
                                                                                                
OK                                                          192.168.1.188[Dec 13 17:31][------] 
                                                                 http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green sc
*                                                                                                
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
                                                                                                 
OK                                                           192.168.1.188[Dec 13 17:31][------] 
                                                                  http://192.168.1.188/readme.txt 
If no index.html type page is found, this web server generates its own index, which is a green    
screen with the files listed much like a directory page, or an ftp site. All one has to do is     
click on the file or directory name and it will open! Clicking the two dots (../) will take one   
back up one level.                                                                                
*                                                                                                 
                                                                                                  
                                                                                                  
                                                                                                  
                             âââââââââââââ Exit ELinks ââââââââââââââ                                      â                             
                             â  Do you really want to exit ELinks?  â                             
                             â                                      â                             
                             â           [ Yes ]  [ No ]            â                             
                             ââââââââââââââââââââââââââââââââââââââââpi@raspberrypi:~ $ 


pi@raspberrypi:/etc $ cat /home/local/www/logs/*log   ### 3382
::1 - - [13/Dec/2023:21:18:38 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:21:18:42 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:37 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:41 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
192.168.1.188 - - [14/Dec/2023:00:27:56 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:38 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:42 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:48 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:52 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
pi@raspberrypi:/etc $ 


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


pi@raspberrypi:/etc $ cd cron.daily   ###  3398
pi@raspberrypi:/etc/cron.daily $ 
pi@raspberrypi:/etc/cron.daily $ 


pi@raspberrypi:/etc/cron.daily $ ls -al   ### 3403
total 40
drwxr-xr-x   2 root root  4096 Dec  9 20:43 .
drwxr-xr-x 129 root root 12288 Dec  9 22:11 ..
-rwxr-xr-x   1 root root  1478 May 25  2023 apt-compat
-rwxr-xr-x   1 root root   123 Mar 26  2023 dpkg
-rwxr-xr-x   1 root root   377 Dec 14  2022 logrotate
-rwxr-xr-x   1 root root  1395 Mar 12  2023 man-db
-rw-r--r--   1 root root   102 Mar  2  2023 .placeholder
-rwxr-xr--   1 pi   pi    1746 Aug 31  2021 thttpd-rotate
pi@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 "/".  ### 3416


pi@raspberrypi:/etc/cron.daily $ sudo ./thttpd-rotate     ### # These files do not exist yet because we do not have 50 log files.   ### 3419
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
pi@raspberrypi:/etc/cron.daily $ 


ppi@raspberrypi:/etc/cron.daily $ ls -alR /home/local/www/logs/  ### 3472
/home/local/www/logs/:
total 16
drwxr-xr-x 2 root   www     4096 Dec 13 17:57 .
drwxr-xr-x 5 root   www     4096 Dec  9 20:52 ..
-rw-r--r-- 1 nobody nogroup  398 Dec 13 17:57 thttpd_log
-rw-r--r-- 1 nobody nogroup 1823 Dec 13 17:57 thttpd_log.01
pi@raspberrypi:/etc/cron.daily $ 


pi@raspberrypi:/etc/cron.daily $ cat /home/local/www/logs/*log.01   ### 3482
::1 - - [13/Dec/2023:21:18:38 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:21:18:42 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:37 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:41 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
192.168.1.188 - - [14/Dec/2023:00:27:56 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:38 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:42 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:48 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:52 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
Wed Dec 13 05:57:36 PM MST 2023
 17:57:36 up  3:47,  3 users,  load average: 0.77, 0.70, 0.66
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    3:46m 27:41   8:54  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                17:57    0.00s  0.06s  0.01s sudo ./thttpd-rotate
pi@raspberrypi:/etc/cron.daily $ 


pi@raspberrypi:/etc/cron.daily $ cat /home/local/www/logs/*log   ### 3501
Wed Dec 13 05:57:36 PM MST 2023
 17:57:36 up  3:47,  3 users,  load average: 0.77, 0.70, 0.66
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    3:46m 27:41   8:54  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                17:57    0.00s  0.05s  0.01s sudo ./thttpd-rotate
pi@raspberrypi:/etc/cron.daily $ 


pi@raspberrypi:/etc/cron.daily $ cd     ### Change to (pi) home.   ### 3511
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ man makeweb   ### 3517
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ man htpasswd   ### 3519
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ man syslogtocern   ### 3521
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ man thttpd   ### 3523
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ man redirect   ### 3525
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ man ssi   ### 3527
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ man strftime   ### 3529
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ man weblog_parse   ### 3531
No manual entry for weblog_parse
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ man http_get   ### 3534
No manual entry for http_get
pi@raspberrypi:~ $ 
pi@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).   ### 3537
pi@raspberrypi:~ $ 


#	************************************  ### 3541

#	If the man pages did not work, this should let them work.   ### 3543


pi@raspberrypi:~ $ cd /home/local/man   ### 3546
pi@raspberrypi:/home/local/man $ 
pi@raspberrypi:/home/local/man $ 


pi@raspberrypi:/home/local/man $ ls -al   ### 3551
total 16
drwxr-xr-x 4 root root 4096 Dec  9 18:36 .
drwxr-xr-x 5 root root 4096 Dec  9 18:36 ..
drwxr-xr-x 2 root root 4096 Dec  9 18:36 man1
drwxr-xr-x 2 root root 4096 Dec  9 18:36 man8
pi@raspberrypi:/home/local/man $ 


pi@raspberrypi:~ $ sudo cp -iav /home/local/man/* /usr/local/man   ### sudo 3560
'/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:~ $ 


#	Then test to see if the man pages work, as was done above.   ### 3572

#	****************************  ### 3574


pi@raspberrypi:/home/local/man $ ls -alR   ### 3577
.:
total 16
drwxr-xr-x 4 root root 4096 Dec  9 18:36 .
drwxr-xr-x 5 root root 4096 Dec  9 18:36 ..
drwxr-xr-x 2 root root 4096 Dec  9 18:36 man1
drwxr-xr-x 2 root root 4096 Dec  9 18:36 man8

./man1:
total 16
drwxr-xr-x 2 root root 4096 Dec  9 18:36 .
drwxr-xr-x 4 root root 4096 Dec  9 18:36 ..
-r--r--r-- 1 root root  414 Dec  9 18:36 htpasswd.1
-r--r--r-- 1 root root 1635 Dec  9 18:36 makeweb.1

./man8:
total 48
drwxr-xr-x 2 root root  4096 Dec  9 18:36 .
drwxr-xr-x 4 root root  4096 Dec  9 18:36 ..
-r--r--r-- 1 root root  3655 Dec  9 18:36 redirect.8
-r--r--r-- 1 root root  5305 Dec  9 18:36 ssi.8
-r--r--r-- 1 root root  2101 Dec  9 18:36 syslogtocern.8
-r--r--r-- 1 bin  bin  24416 Dec  9 18:36 thttpd.8
pi@raspberrypi:/home/local/man $ 


pi@raspberrypi:/home/local/man $ cd   ### 3603
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ date   ### 3608
Wed Dec 13 07:11:01 PM MST 2023
pi@raspberrypi:~ $ 


#	****************************make log entries using different machines or phones.   ### 3613

#	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/.  ### 3615

#	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".  ### 3617


pi@raspberrypi:~ $ cd /home/local/www/logs   ### 3620
pi@raspberrypi:/home/local/www/logs $ 
pi@raspberrypi:/home/local/www/logs $ 


pi@raspberrypi:/home/local/www/logs $ ls -al   ### 3625
total 16
drwxr-xr-x 2 root   www     4096 Dec 13 17:57 .
drwxr-xr-x 5 root   www     4096 Dec  9 20:52 ..
-rw-r--r-- 1 nobody nogroup 2092 Dec 13 19:19 thttpd_log
-rw-r--r-- 1 nobody nogroup 1823 Dec 13 17:57 thttpd_log.01
pi@raspberrypi:/home/local/www/logs $ 


pi@raspberrypi:/home/local/www/logs $ cat *log.01   ### 3634
::1 - - [13/Dec/2023:21:18:38 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:21:18:42 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:37 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:41 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
192.168.1.188 - - [14/Dec/2023:00:27:56 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:38 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:42 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:48 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:52 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
Wed Dec 13 05:57:36 PM MST 2023
 17:57:36 up  3:47,  3 users,  load average: 0.77, 0.70, 0.66
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    3:46m 27:41   8:54  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                17:57    0.00s  0.06s  0.01s sudo ./thttpd-rotate
pi@raspberrypi:/home/local/www/logs $ 


pi@raspberrypi:/home/local/www/logs $ cat *log   ### 3653
Wed Dec 13 05:57:36 PM MST 2023
 17:57:36 up  3:47,  3 users,  load average: 0.77, 0.70, 0.66
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    3:46m 27:41   8:54  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                17:57    0.00s  0.05s  0.01s sudo ./thttpd-rotate
192.168.1.24 - - [14/Dec/2023:02:17:11 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.24 - - [14/Dec/2023:02:17:18 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.24 - - [14/Dec/2023:02:17:24 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.24 - - [14/Dec/2023:02:17:31 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.24 - - [14/Dec/2023:02:17:37 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.216 - - [14/Dec/2023:02:18:56 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
192.168.1.216 - - [14/Dec/2023:02:19:00 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
192.168.1.216 - - [14/Dec/2023:02:19:06 +0000] "GET /robots.txt HTTP/1.1" 304 0 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
192.168.1.216 - - [14/Dec/2023:02:19:13 +0000] "GET /readme.txt HTTP/1.1" 304 0 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
192.168.1.216 - - [14/Dec/2023:02:19:17 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
pi@raspberrypi:/home/local/www/logs $ 
pi@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.  ### 3674


pi@raspberrypi:/home/local/www/logs $ cd /home/local/sbin/os-debug/   ### 3677
pi@raspberrypi:/home/local/sbin/os-debug $ 
pi@raspberrypi:/home/local/sbin/os-debug $ 


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


pi@raspberrypi:/home/local/sbin/os-debug $ ls -al   ### 3685
total 48
drwxr-xr-x 2 pi   pi   4096 Jul 12  2022 .
drwxr-xr-x 4 root root 4096 Dec  9 20:34 ..
-rwxr-xr-- 1 pi   pi    185 Aug 31  2021 datelog
-r-xr-xr-- 1 pi   pi    185 Aug 31  2021 datelog~
-rwxr-xr-- 1 pi   pi    385 Aug 31  2021 dead-thttpd
-r-xr-xr-- 1 pi   pi    385 Aug 31  2021 dead-thttpd~
-r--r--r-- 1 pi   pi    792 Apr 22  2022 readme.txt
-r--r--r-- 1 pi   pi    792 Apr 22  2022 readme.txt~
-rwxr-xr-- 1 pi   pi   1965 Aug 31  2021 thttpd-rotate
-r-xr-xr-- 1 pi   pi   1965 Aug 31  2021 thttpd-rotate~
-rwxr-xr-- 1 pi   pi    153 Aug 31  2021 thttpd_wrapper
-r-xr-xr-- 1 pi   pi    153 Aug 31  2021 thttpd_wrapper~
pi@raspberrypi:/home/local/sbin/os-debug $ 


pi@raspberrypi:/home/local/sbin/os-debug $ cat readme.txt   ### 3702
#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 $ 
#
pi@raspberrypi:/home/local/sbin/os-debug $ 


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


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


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


# *****************  ### 3742


pi@raspberrypi:/home/local/sbin/os-debug $ cat thttpd_wrapper   ### 3745
#!/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
#
pi@raspberrypi:/home/local/sbin/os-debug $ 


pi@raspberrypi:/home/local/sbin/os-debug $ cat thttpd-rotate   ### 3758
#!/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

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


pi@raspberrypi:/home/local/sbin/os-debug $ cat dead-thttpd   ### 3835
#!/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

#

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


pi@raspberrypi:/home/local/sbin/os-debug $ cat datelog   ### 3853
#!/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

#

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


pi@raspberrypi:/home/local/sbin/os-debug $ date   ### 3866
Wed Dec 13 07:51:41 PM MST 2023
pi@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.   ### 3871




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


pi@raspberrypi:/etc/cron.daily $ ls -al   ### 3881
total 40
drwxr-xr-x   2 root root  4096 Dec  9 20:43 .
drwxr-xr-x 129 root root 12288 Dec  9 22:11 ..
-rwxr-xr-x   1 root root  1478 May 25  2023 apt-compat
-rwxr-xr-x   1 root root   123 Mar 26  2023 dpkg
-rwxr-xr-x   1 root root   377 Dec 14  2022 logrotate
-rwxr-xr-x   1 root root  1395 Mar 12  2023 man-db
-rw-r--r--   1 root root   102 Mar  2  2023 .placeholder
-rwxr-xr--   1 pi   pi    1965 Aug 31  2021 thttpd-rotate
pi@raspberrypi:/etc/cron.daily $ 


pi@raspberrypi:/etc/cron.daily $ cat thttpd-rotate   ### 3894
#!/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

#
pi@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.  ### 3971

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

#	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.   ### 3975



pi@raspberrypi:/etc/cron.daily $ sudo ./thttpd-rotate   ### sudo 3979
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
pi@raspberrypi:/etc/cron.daily $ 



pi@raspberrypi:/etc/cron.daily $ sudo datelog   ### 4032
sudo: datelog: command not found
pi@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/"!   ### 4036



pi@raspberrypi:/etc/cron.daily $ sudo ls -al /home/local/sbin   ### 4040
total 204
drwxr-xr-x 4 root root   4096 Dec 13 19:39 .
drwxr-xr-x 5 root root   4096 Dec  9 18:36 ..
-rwxr-xr-- 1 pi   pi      185 Aug 31  2021 datelog
-r-xr-xr-- 1 pi   pi      185 Aug 31  2021 datelog~
-rwxr-xr-- 1 pi   pi      385 Aug 31  2021 dead-thttpd
-r-xr-xr-- 1 pi   pi      385 Aug 31  2021 dead-thttpd~
-rwxr-xr-x 1 root root  72280 Dec  9 18:36 htpasswd
-rwxr-sr-x 1 root www   71464 Dec  9 18:36 makeweb
drwxr-xr-x 2 pi   pi     4096 Jul 12  2022 os-debug
-r-xr-xr-x 1 root root   2878 Dec  9 18:36 syslogtocern
-r-xr-xr-x 1 bin  bin  157800 Dec  9 18:36 thttpd
drwxr-xr-x 3 pi   pi     4096 Jul 12  2022 thttpd-extras
-rwxr-xr-- 1 pi   pi      153 Aug 31  2021 thttpd_wrapper
pi@raspberrypi:/etc/cron.daily $ 



pi@raspberrypi:/etc/cron.daily $ sudo cp -iav /home/local/sbin/* /usr/local/sbin   ### sudo 4059
'/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/thttpd-rotate' -> '/usr/local/sbin/os-debug/thttpd-rotate'
'/home/local/sbin/os-debug/thttpd_wrapper~' -> '/usr/local/sbin/os-debug/thttpd_wrapper~'
'/home/local/sbin/os-debug/dead-thttpd' -> '/usr/local/sbin/os-debug/dead-thttpd'
'/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_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-rotate~' -> '/usr/local/sbin/os-debug/thttpd-rotate~'
'/home/local/sbin/os-debug/datelog' -> '/usr/local/sbin/os-debug/datelog'
'/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/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/thttpd_wrapper~' -> '/usr/local/sbin/thttpd-extras/thttpd_wrapper~'
'/home/local/sbin/thttpd-extras/readme.txt' -> '/usr/local/sbin/thttpd-extras/readme.txt'
'/home/local/sbin/thttpd-extras/favicon.ico' -> '/usr/local/sbin/thttpd-extras/favicon.ico'
'/home/local/sbin/thttpd-extras/vhost-DN-test' -> '/usr/local/sbin/thttpd-extras/vhost-DN-test'
'/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-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/a0/test' -> '/usr/local/sbin/thttpd-extras/vhost-DN-test/192.168.1.128/a0/test'
'/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/robots.txt' -> '/usr/local/sbin/thttpd-extras/robots.txt'
'/home/local/sbin/thttpd-extras/anvil_thttpd.gif' -> '/usr/local/sbin/thttpd-extras/anvil_thttpd.gif'
'/home/local/sbin/thttpd-extras/thttpd_config~' -> '/usr/local/sbin/thttpd-extras/thttpd_config~'
'/home/local/sbin/thttpd-extras/thttpd_wrapper' -> '/usr/local/sbin/thttpd-extras/thttpd_wrapper'
'/home/local/sbin/thttpd-extras/rc.local' -> '/usr/local/sbin/thttpd-extras/rc.local'
'/home/local/sbin/thttpd-extras/sitemap.xml.txt' -> '/usr/local/sbin/thttpd-extras/sitemap.xml.txt'
'/home/local/sbin/thttpd-extras/thttpd.sh~' -> '/usr/local/sbin/thttpd-extras/thttpd.sh~'
'/home/local/sbin/thttpd-extras/rc.local~' -> '/usr/local/sbin/thttpd-extras/rc.local~'
'/home/local/sbin/thttpd-extras/thttpd.sh' -> '/usr/local/sbin/thttpd-extras/thttpd.sh'
'/home/local/sbin/thttpd-extras/thttpd-rotate~' -> '/usr/local/sbin/thttpd-extras/thttpd-rotate~'
'/home/local/sbin/thttpd-extras/robots-site.txt' -> '/usr/local/sbin/thttpd-extras/robots-site.txt'
'/home/local/sbin/thttpd-extras/thttpd_config' -> '/usr/local/sbin/thttpd-extras/thttpd_config'
'/home/local/sbin/thttpd_wrapper' -> '/usr/local/sbin/thttpd_wrapper'
pi@raspberrypi:/etc/cron.daily $ 


pi@raspberrypi:/etc/cron.daily $ ls -al /usr/local/sbin   ### 4108
total 204
drwxr-xr-x  4 root root   4096 Dec 13 20:07 .
drwxr-xr-x 10 root root   4096 Oct  9 21:35 ..
-rwxr-xr--  1 pi   pi      185 Aug 31  2021 datelog
-r-xr-xr--  1 pi   pi      185 Aug 31  2021 datelog~
-rwxr-xr--  1 pi   pi      385 Aug 31  2021 dead-thttpd
-r-xr-xr--  1 pi   pi      385 Aug 31  2021 dead-thttpd~
-rwxr-xr-x  1 root root  72280 Dec  9 18:36 htpasswd
-rwxr-sr-x  1 root www   71464 Dec  9 18:36 makeweb
drwxr-xr-x  2 pi   pi     4096 Jul 12  2022 os-debug
-r-xr-xr-x  1 root root   2878 Dec  9 18:36 syslogtocern
-r-xr-xr-x  1 bin  bin  157800 Dec  9 18:36 thttpd
drwxr-xr-x  3 pi   pi     4096 Jul 12  2022 thttpd-extras
-rwxr-xr--  1 pi   pi      153 Aug 31  2021 thttpd_wrapper
pi@raspberrypi:/etc/cron.daily $ 



pi@raspberrypi:/etc/cron.daily $ sudo datelog   ### 4127
pi@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/!!!   ### 4130



pi@raspberrypi:/etc/cron.daily $ cd /home/local/www/logs   ### 4134
pi@raspberrypi:/home/local/www/logs $ 
pi@raspberrypi:/home/local/www/logs $ 


pi@raspberrypi:/home/local/www/logs $ ls -al   ### 4139
total 20
drwxr-xr-x 2 root   www     4096 Dec 13 20:00 .
drwxr-xr-x 5 root   www     4096 Dec  9 20:52 ..
-rw-r--r-- 1 nobody nogroup 1002 Dec 13 20:10 thttpd_log
-rw-r--r-- 1 nobody nogroup 2561 Dec 13 20:00 thttpd_log.01
-rw-r--r-- 1 nobody nogroup 1823 Dec 13 17:57 thttpd_log.02
pi@raspberrypi:/home/local/www/logs $ 


pi@raspberrypi:/home/local/www/logs $ cat *log.02   ### 4149
::1 - - [13/Dec/2023:21:18:38 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:21:18:42 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:37 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
::1 - - [13/Dec/2023:22:46:41 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://localhost/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 80x24-2)"
192.168.1.188 - - [14/Dec/2023:00:27:56 +0000] "GET / HTTP/1.1" 200 25000 "" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:38 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:42 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:48 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
192.168.1.188 - - [14/Dec/2023:00:29:52 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.188/" "ELinks/0.13.2 (textmode; Linux 6.1.0-rpi7-rpi-v8 aarch64; 90x24-2)"
Wed Dec 13 05:57:36 PM MST 2023
 17:57:36 up  3:47,  3 users,  load average: 0.77, 0.70, 0.66
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    3:46m 27:41   8:54  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                17:57    0.00s  0.06s  0.01s sudo ./thttpd-rotate
pi@raspberrypi:/home/local/www/logs $ 



pi@raspberrypi:/home/local/www/logs $ cat *log.01   ### 4169
Wed Dec 13 05:57:36 PM MST 2023
 17:57:36 up  3:47,  3 users,  load average: 0.77, 0.70, 0.66
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    3:46m 27:41   8:54  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                17:57    0.00s  0.05s  0.01s sudo ./thttpd-rotate
192.168.1.24 - - [14/Dec/2023:02:17:11 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.24 - - [14/Dec/2023:02:17:18 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.24 - - [14/Dec/2023:02:17:24 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.24 - - [14/Dec/2023:02:17:31 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.24 - - [14/Dec/2023:02:17:37 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:120.0) Gecko/120.0 Firefox/120.0"
192.168.1.216 - - [14/Dec/2023:02:18:56 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
192.168.1.216 - - [14/Dec/2023:02:19:00 +0000] "GET /a0/ HTTP/1.1" 200 25000 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
192.168.1.216 - - [14/Dec/2023:02:19:06 +0000] "GET /robots.txt HTTP/1.1" 304 0 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
192.168.1.216 - - [14/Dec/2023:02:19:13 +0000] "GET /readme.txt HTTP/1.1" 304 0 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
192.168.1.216 - - [14/Dec/2023:02:19:17 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.1.188/" "Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/112.0 Firefox/112.0"
Wed Dec 13 08:00:55 PM MST 2023
log rotate end, thttpd pid =  PID TTY TIME CMD 22016 ? 00:01:17 thttpd
 20:00:55 up  5:50,  3 users,  load average: 0.79, 0.84, 0.82
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    5:49m 48:25  13:33  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                20:00    1.00s  0.06s  0.01s sudo ./thttpd-rotate
pi@raspberrypi:/home/local/www/logs $ 



pi@raspberrypi:/home/local/www/logs $ cat *log   ### 4197
Wed Dec 13 08:00:55 PM MST 2023
old log rotate end, old thttpd pid =  PID TTY TIME CMD 22016 ? 00:01:17 thttpd
log rotate new, thttpd pid =  PID TTY TIME CMD 33084 ? 00:00:00 thttpd
 20:01:10 up  5:50,  3 users,  load average: 0.62, 0.80, 0.80
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    5:49m 47:09  13:33  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                20:00   16.00s  0.05s  0.01s sudo ./thttpd-rotate
datelog, thttpd pid =  PID TTY TIME CMD 33084 ? 00:00:06 thttpd
Wed Dec 13 08:10:51 PM MST 2023
 20:10:51 up  6:00,  3 users,  load average: 1.03, 0.85, 0.81
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
pi                -                Sat22    5:59m 49:24  14:01  /usr/bin/wayfire
pi       tty1     -                Sat22    3days  0.08s  0.06s -bash
pi       pts/5    -                20:10    0.00s  0.05s   ?    sudo datelog
pi@raspberrypi:/home/local/www/logs $ 



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

#	While it is still running I will finish with adding more "users" to the web site.   ### 4219


pi@raspberrypi:/home/local/www/logs $ date   ### 4222
Wed Dec 13 08:22:15 PM MST 2023
pi@raspberrypi:/home/local/www/logs $ 



#	*****************************  ### 4228
#	*****************************  ### 4229


pi@raspberrypi:/home/local/www/logs $ cd /home/  ### 4232
pi@raspberrypi:/home $ 
pi@raspberrypi:/home $ 


#	Adding more Web Users, (Headings).   ### 4237

#	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.   ### 4239



pi@raspberrypi:/home $ addgroup --help   ### 4243
adduser [--uid id] [--firstuid id] [--lastuid id]
        [--gid id] [--firstgid id] [--lastgid id] [--ingroup group]
        [--add-extra-groups] [--shell shell]
        [--comment comment] [--home dir] [--no-create-home]
        [--allow-all-names] [--allow-bad-names]
        [--disabled-password] [--disabled-login]
        [--conf file] [--quiet] [--verbose] [--debug]
        user
    Add a normal user

adduser --system
        [--uid id] [--group] [--ingroup group] [--gid id]
        [--shell shell] [--comment comment] [--home dir] [--no-create-home]
        [--conf file] [--quiet] [--verbose] [--debug]
        user
   Add a system user

adduser --group
        [--gid ID] [--firstgid id] [--lastgid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
addgroup
        [--gid ID] [--firstgid id] [--lastgid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
   Add a user group

addgroup --system
        [--gid id]
        [--conf file] [--quiet] [--verbose] [--debug]
        group
   Add a system group

adduser USER GROUP
   Add an existing user to an existing group
pi@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.   ### 4283


pi@raspberrypi:/home $ cat ~/freedom/adding-users.txt   ### 4286
adding-users.txt   ### 4286

#
#	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)
#
#
# *********
# 
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ cat ~/freedom/list.txt   ### 4307
list.txt

  a0  documents  downloads  memes  music  notices  pictures  videos  

pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ date   ### 4315
Wed Dec 13 08:49:28 PM MST 2023
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ sudo adduser --ingroup www documents   ### sudo 4320
Adding user `documents' ...
Adding new user `documents' (1002) with group `www (122)' ...
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
Adding new user `documents' to supplemental / extra groups `users' ...
Adding user `documents' to group `users' ...
pi@raspberrypi:/home $ 


su documents   ### 4341


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


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


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


documents@raspberrypi:~ $ ls -al   ### 4359
total 28
drwx------ 2 documents www  4096 Dec 13 21:02 .
drwxr-xr-x 6 root      root 4096 Dec 13 20:53 ..
-rw-r--r-- 1 documents www     0 Dec 13 21:01 .1002
-rw-r--r-- 1 documents www   220 Dec 13 20:53 .bash_logout
-rw-r--r-- 1 documents www  3523 Dec 13 20:53 .bashrc
-rw-r--r-- 1 documents www  5290 Dec 13 20:53 .face
lrwxrwxrwx 1 documents www     5 Dec 13 20:53 .face.icon -> .face
-rw-r--r-- 1 documents www   807 Dec 13 20:53 .profile
lrwxrwxrwx 1 documents www    31 Dec 13 21:02 public_html -> /home/local/www/users/documents
documents@raspberrypi:~ $ 


documents@raspberrypi:~ $ exit   ### 4373
exit
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ date   ### 4378
Wed Dec 13 09:06:46 PM MST 2023
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ sudo adduser --ingroup www downloads   ### sudo 4383
Adding user `downloads' ...
Adding new user `downloads' (1003) with group `www (122)' ...
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
Adding new user `downloads' to supplemental / extra groups `users' ...
Adding user `downloads' to group `users' ...
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ su downloads   ### 4404
Password: 
downloads@raspberrypi:/home $ 


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


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


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


downloads@raspberrypi:~ $ ls -al   ### 4424
total 28
drwx------ 2 downloads www  4096 Dec 13 21:15 .
drwxr-xr-x 7 root      root 4096 Dec 13 21:08 ..
-rw-r--r-- 1 downloads www     0 Dec 13 21:13 .1003
-rw-r--r-- 1 downloads www   220 Dec 13 21:08 .bash_logout
-rw-r--r-- 1 downloads www  3523 Dec 13 21:08 .bashrc
-rw-r--r-- 1 downloads www  5290 Dec 13 21:08 .face
lrwxrwxrwx 1 downloads www     5 Dec 13 21:08 .face.icon -> .face
-rw-r--r-- 1 downloads www   807 Dec 13 21:08 .profile
lrwxrwxrwx 1 downloads www    31 Dec 13 21:15 public_html -> /home/local/www/users/downloads
downloads@raspberrypi:~ $ 


downloads@raspberrypi:~ $ exit   ### 4438
exit
pi@raspberrypi:/home $ 
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ date   ### 4444
Wed Dec 13 09:18:53 PM MST 2023
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ sudo adduser --ingroup www memes   ### sudo 4449
Adding user `memes' ...
Adding new user `memes' (1004) with group `www (122)' ...
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
Adding new user `memes' to supplemental / extra groups `users' ...
Adding user `memes' to group `users' ...
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ su memes   ### 4470
Password: 
memes@raspberrypi:/home $ 
memes@raspberrypi:/home $ 


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


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


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


memes@raspberrypi:~ $ ls -al   ### 4491
total 28
drwx------ 2 memes www  4096 Dec 13 21:25 .
drwxr-xr-x 8 root  root 4096 Dec 13 21:20 ..
-rw-r--r-- 1 memes www     0 Dec 13 21:24 .1004
-rw-r--r-- 1 memes www   220 Dec 13 21:20 .bash_logout
-rw-r--r-- 1 memes www  3523 Dec 13 21:20 .bashrc
-rw-r--r-- 1 memes www  5290 Dec 13 21:20 .face
lrwxrwxrwx 1 memes www     5 Dec 13 21:20 .face.icon -> .face
-rw-r--r-- 1 memes www   807 Dec 13 21:20 .profile
lrwxrwxrwx 1 memes www    27 Dec 13 21:25 public_html -> /home/local/www/users/memes
memes@raspberrypi:~ $ 


memes@raspberrypi:~ $ exit   ### 4505
exit
pi@raspberrypi:/home $ 
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ sudo adduser --ingroup www music   ### sudo 4511
Adding user `music' ...
Adding new user `music' (1005) with group `www (122)' ...
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
Adding new user `music' to supplemental / extra groups `users' ...
Adding user `music' to group `users' ...
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ su music   ### 4532
Password: 
music@raspberrypi:/home $ 
music@raspberrypi:/home $ 


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


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


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


music@raspberrypi:~ $ ls -al   ### 4553
total 28
drwx------ 2 music www  4096 Dec 13 21:35 .
drwxr-xr-x 9 root  root 4096 Dec 13 21:29 ..
-rw-r--r-- 1 music www     0 Dec 13 21:34 .1005
-rw-r--r-- 1 music www   220 Dec 13 21:29 .bash_logout
-rw-r--r-- 1 music www  3523 Dec 13 21:29 .bashrc
-rw-r--r-- 1 music www  5290 Dec 13 21:29 .face
lrwxrwxrwx 1 music www     5 Dec 13 21:29 .face.icon -> .face
-rw-r--r-- 1 music www   807 Dec 13 21:29 .profile
lrwxrwxrwx 1 music www    27 Dec 13 21:35 public_html -> /home/local/www/users/music
music@raspberrypi:~ $ 


music@raspberrypi:~ $ exit   ### 4567
exit
pi@raspberrypi:/home $ 
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ sudo adduser --ingroup www notices   ### sudo 4573
Adding user `notices' ...
Adding new user `notices' (1006) with group `www (122)' ...
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
Adding new user `notices' to supplemental / extra groups `users' ...
Adding user `notices' to group `users' ...
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ su notices   ### 4594
Password: 
notices@raspberrypi:/home $ 
notices@raspberrypi:/home $ 


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


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


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


notices@raspberrypi:~ $ ls -al   ### 4615
total 28
drwx------  2 notices www  4096 Dec 13 21:44 .
drwxr-xr-x 10 root    root 4096 Dec 13 21:38 ..
-rw-r--r--  1 notices www     0 Dec 13 21:43 .1006
-rw-r--r--  1 notices www   220 Dec 13 21:38 .bash_logout
-rw-r--r--  1 notices www  3523 Dec 13 21:38 .bashrc
-rw-r--r--  1 notices www  5290 Dec 13 21:38 .face
lrwxrwxrwx  1 notices www     5 Dec 13 21:38 .face.icon -> .face
-rw-r--r--  1 notices www   807 Dec 13 21:38 .profile
lrwxrwxrwx  1 notices www    29 Dec 13 21:44 public_html -> /home/local/www/users/notices
notices@raspberrypi:~ $ 


notices@raspberrypi:~ $ exit   ### 4629
exit
pi@raspberrypi:/home $ 
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ sudo adduser --ingroup www pictures   ### sudo 4635
Adding user `pictures' ...
Adding new user `pictures' (1007) with group `www (122)' ...
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
Adding new user `pictures' to supplemental / extra groups `users' ...
Adding user `pictures' to group `users' ...
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ su pictures   ### 4656
Password: 
pictures@raspberrypi:/home $ 
pictures@raspberrypi:/home $ 


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


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


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


pictures@raspberrypi:~ $ ls -al   ### 4677
total 28
drwx------  2 pictures www  4096 Dec 13 21:52 .
drwxr-xr-x 11 root     root 4096 Dec 13 21:47 ..
-rw-r--r--  1 pictures www     0 Dec 13 21:51 .1007
-rw-r--r--  1 pictures www   220 Dec 13 21:47 .bash_logout
-rw-r--r--  1 pictures www  3523 Dec 13 21:47 .bashrc
-rw-r--r--  1 pictures www  5290 Dec 13 21:47 .face
lrwxrwxrwx  1 pictures www     5 Dec 13 21:47 .face.icon -> .face
-rw-r--r--  1 pictures www   807 Dec 13 21:47 .profile
lrwxrwxrwx  1 pictures www    30 Dec 13 21:52 public_html -> /home/local/www/users/pictures
pictures@raspberrypi:~ $ 


pictures@raspberrypi:~ $ exit   ### 4691
exit
pi@raspberrypi:/home $ 
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ sudo adduser --ingroup www videos   ### sudo 4697
Adding user `videos' ...
Adding new user `videos' (1008) with group `www (122)' ...
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
Adding new user `videos' to supplemental / extra groups `users' ...
Adding user `videos' to group `users' ...
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ su videos   ### 4718
Password: 
videos@raspberrypi:/home $ 
videos@raspberrypi:/home $ 


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


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


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


videos@raspberrypi:~ $ ls -al   ### 4739
total 28
drwx------  2 videos www  4096 Dec 13 22:01 .
drwxr-xr-x 12 root   root 4096 Dec 13 21:56 ..
-rw-r--r--  1 videos www     0 Dec 13 22:00 .1008
-rw-r--r--  1 videos www   220 Dec 13 21:56 .bash_logout
-rw-r--r--  1 videos www  3523 Dec 13 21:56 .bashrc
-rw-r--r--  1 videos www  5290 Dec 13 21:56 .face
lrwxrwxrwx  1 videos www     5 Dec 13 21:56 .face.icon -> .face
-rw-r--r--  1 videos www   807 Dec 13 21:56 .profile
lrwxrwxrwx  1 videos www    28 Dec 13 22:01 public_html -> /home/local/www/users/videos
videos@raspberrypi:~ $ 


videos@raspberrypi:~ $ exit   ### 4753
exit
pi@raspberrypi:/home $ 
pi@raspberrypi:/home $ 



pi@raspberrypi:/home $ ls -al   ### 4760
total 48
drwxr-xr-x 12 root      root 4096 Dec 13 21:56 .
drwxr-xr-x 18 root      root 4096 Dec  7 15:12 ..
drwx------  2 a0        www  4096 Dec  9 19:41 a0
drwx------  2 documents www  4096 Dec 13 21:05 documents
drwx------  2 downloads www  4096 Dec 13 21:17 downloads
drwxr-xr-x  5 root      root 4096 Dec  9 18:36 local
drwx------  2 memes     www  4096 Dec 13 21:28 memes
drwx------  2 music     www  4096 Dec 13 21:37 music
drwx------  2 notices   www  4096 Dec 13 21:46 notices
drwx------ 19 pi        pi   4096 Dec 13 20:50 pi
drwx------  2 pictures  www  4096 Dec 13 21:54 pictures
drwx------  2 videos    www  4096 Dec 13 22:04 videos
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ sudo chown -Rv a0:www a0   ### 4777
ownership of 'a0/.1001' retained as a0:www
ownership of 'a0/.bash_logout' retained as a0:www
ownership of 'a0/.face.icon' retained as a0:www
ownership of 'a0/.face' retained as a0:www
ownership of 'a0/.bashrc' retained as a0:www
ownership of 'a0/public_html' retained as a0:www
ownership of 'a0/.profile' retained as a0:www
ownership of 'a0/.bash_history' retained as a0:www
ownership of 'a0' retained as a0:www
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ ls -al   ### 4790
total 48
drwxr-xr-x 12 root      root 4096 Dec 13 21:56 .
drwxr-xr-x 18 root      root 4096 Dec  7 15:12 ..
drwx------  2 a0        www  4096 Dec  9 19:41 a0
drwx------  2 documents www  4096 Dec 13 21:05 documents
drwx------  2 downloads www  4096 Dec 13 21:17 downloads
drwxr-xr-x  5 root      root 4096 Dec  9 18:36 local
drwx------  2 memes     www  4096 Dec 13 21:28 memes
drwx------  2 music     www  4096 Dec 13 21:37 music
drwx------  2 notices   www  4096 Dec 13 21:46 notices
drwx------ 19 pi        pi   4096 Dec 13 20:50 pi
drwx------  2 pictures  www  4096 Dec 13 21:54 pictures
drwx------  2 videos    www  4096 Dec 13 22:04 videos
pi@raspberrypi:/home $ 


pi@raspberrypi:/home $ cd /home/local/www/users   ### 4807
pi@raspberrypi:/home/local/www/users $ 
pi@raspberrypi:/home/local/www/users $ 


pi@raspberrypi:/home/local/www/users $ ls -al   ### 4812
total 52
drwxrwxr-x 10 root      www 4096 Dec 13 22:01 .
drwxr-xr-x  5 root      www 4096 Dec  9 20:52 ..
drwxr-xr-x  2 a0        www 4096 Dec  9 19:38 a0
drwxr-xr-x  2 documents www 4096 Dec 13 21:02 documents
drwxr-xr-x  2 downloads www 4096 Dec 13 21:15 downloads
-rw-r--r--  1 pi        pi   533 Jan  8  2020 favicon.ico
drwxr-xr-x  2 memes     www 4096 Dec 13 21:25 memes
drwxr-xr-x  2 music     www 4096 Dec 13 21:35 music
drwxr-xr-x  2 notices   www 4096 Dec 13 21:44 notices
drwxr-xr-x  2 pictures  www 4096 Dec 13 21:52 pictures
-rw-r--r--  1 pi        pi   308 Aug 13  2021 readme.txt
-rw-r--r--  1 pi        pi    27 Jan  8  2020 robots.txt
drwxr-xr-x  2 videos    www 4096 Dec 13 22:01 videos
pi@raspberrypi:/home/local/www/users $ 


pi@raspberrypi:/home/local/www/users $ date   ### 4830
Wed Dec 13 10:12:27 PM MST 2023
pi@raspberrypi:/home/local/www/users $ 


pi@raspberrypi:/home/local/www/users $ df -H   ### 4835
Filesystem      Size  Used Avail Use% Mounted on
udev            1.8G     0  1.8G   0% /dev
tmpfs           398M  1.4M  397M   1% /run
/dev/mmcblk0p2   30G  6.6G   22G  23% /
tmpfs           2.0G  275k  2.0G   1% /dev/shm
tmpfs           5.3M   13k  5.3M   1% /run/lock
/dev/mmcblk0p1  535M   76M  459M  15% /boot/firmware
tmpfs           398M   50k  398M   1% /run/user/1000
pi@raspberrypi:/home/local/www/users $ 


pi@raspberrypi:/home/local/www/users $ cd   ### 4847
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ ps -e   ### 4852
    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
      5 ?        00:00:00 slub_flushwq
      6 ?        00:00:00 netns
     10 ?        00:00:00 mm_percpu_wq
     11 ?        00:00:00 rcu_tasks_kthread
     12 ?        00:00:00 rcu_tasks_rude_kthread
     13 ?        00:00:00 rcu_tasks_trace_kthread
     14 ?        00:00:00 ksoftirqd/0
     15 ?        00:00:34 rcu_preempt
     16 ?        00:00:00 migration/0
     17 ?        00:00:00 cpuhp/0
     18 ?        00:00:00 cpuhp/1
     19 ?        00:00:00 migration/1
     20 ?        00:00:00 ksoftirqd/1
     23 ?        00:00:00 cpuhp/2
     24 ?        00:00:00 migration/2
     25 ?        00:00:00 ksoftirqd/2
     28 ?        00:00:00 cpuhp/3
     29 ?        00:00:00 migration/3
     30 ?        00:00:00 ksoftirqd/3
     33 ?        00:00:00 kdevtmpfs
     34 ?        00:00:00 inet_frag_wq
     36 ?        00:00:00 kauditd
     38 ?        00:00:00 khungtaskd
     40 ?        00:00:00 oom_reaper
     41 ?        00:00:00 writeback
     42 ?        00:00:01 kcompactd0
     43 ?        00:00:00 kintegrityd
     44 ?        00:00:00 kblockd
     45 ?        00:00:00 blkcg_punt_bio
     46 ?        00:00:00 watchdogd
     49 ?        00:00:00 kworker/1:1H-kblockd
     50 ?        00:00:00 rpciod
     51 ?        00:00:00 xprtiod
     55 ?        00:00:00 kswapd0
     56 ?        00:00:00 nfsiod
     57 ?        00:00:00 kthrotld
     65 ?        00:00:00 irq/31-aerdrv
     67 ?        00:00:00 hwrng
     68 ?        00:00:00 iscsi_conn_clea
     69 ?        00:00:00 nvme-wq
     70 ?        00:00:00 nvme-reset-wq
     71 ?        00:00:00 nvme-delete-wq
     73 ?        00:00:00 DWC Notificatio
     74 ?        00:00:00 uas
     76 ?        00:00:00 vchiq-slot/0
     77 ?        00:00:00 vchiq-recy/0
     78 ?        00:00:00 vchiq-sync/0
     85 ?        00:00:00 zswap-shrink
     86 ?        00:00:08 kworker/u9:0-brcmf_wq/mmc1:0001:1
    106 ?        00:00:00 sdhci
    107 ?        00:00:00 irq/37-mmc0
    126 ?        00:00:00 mmc_complete
    133 ?        00:00:00 kworker/3:1H-kblockd
    150 ?        00:00:00 kworker/2:1H-kblockd
    185 ?        00:00:00 irq/39-vc4 hdmi hpd connected
    186 ?        00:00:00 irq/40-vc4 hdmi hpd disconnected
    187 ?        00:00:00 cec-vc4-hdmi-0
    188 ?        00:00:34 v3d_bin
    189 ?        00:00:37 v3d_render
    190 ?        00:00:00 irq/41-vc4 hdmi cec rx
    191 ?        00:00:00 v3d_tfu
    192 ?        00:00:00 v3d_csd
    193 ?        00:00:00 irq/42-vc4 hdmi cec tx
    194 ?        00:00:00 v3d_cache_clean
    195 ?        00:00:00 irq/44-vc4 hdmi hpd connected
    196 ?        00:00:00 irq/45-vc4 hdmi hpd disconnected
    197 ?        00:00:00 cec-vc4-hdmi-1
    198 ?        00:00:00 irq/46-vc4 hdmi cec rx
    199 ?        00:00:00 irq/47-vc4 hdmi cec tx
    200 ?        00:00:00 card0-crtc0
    201 ?        00:00:00 card0-crtc1
    202 ?        00:00:00 card0-crtc2
    203 ?        00:00:00 card0-crtc3
    204 ?        00:00:00 card0-crtc4
    205 ?        00:00:00 card0-crtc5
    234 ?        00:00:01 jbd2/mmcblk0p2-8
    235 ?        00:00:00 ext4-rsv-conver
    251 ?        00:00:00 mld
    252 ?        00:00:00 ipv6_addrconf
    296 ?        00:00:01 systemd-journal
    314 ?        00:00:01 systemd-udevd
    367 ?        00:00:00 vchiq-keep/0
    368 ?        00:00:00 SMIO
    444 ?        00:00:00 mmal-vchiq
    452 ?        00:00:00 systemd-timesyn
    460 ?        00:00:00 mmal-vchiq
    470 ?        00:00:00 cfg80211
    473 ?        00:00:00 mmal-vchiq
    474 ?        00:00:00 mmal-vchiq
    475 ?        00:00:00 mmal-vchiq
    476 ?        00:00:00 mmal-vchiq
    477 ?        00:00:00 mmal-vchiq
    512 ?        00:00:00 irq/53-feb10000.codec
    528 ?        00:00:01 accounts-daemon
    529 ?        00:00:00 brcmf_wq/mmc1:0
    533 ?        00:00:01 brcmf_wdog/mmc1:0001:1
    537 ?        00:00:00 avahi-daemon
    539 ?        00:00:00 cron
    540 ?        00:00:03 dbus-daemon
    549 ?        00:00:01 polkitd
    550 ?        00:00:00 avahi-daemon
    569 ?        00:00:00 kworker/u9:2-hci0
    576 ?        00:00:00 systemd-logind
    596 ?        00:00:43 thd
    602 ?        00:00:00 udisksd
    637 ?        00:00:05 NetworkManager
    653 ?        00:00:00 wpa_supplicant
    665 ?        00:00:00 ModemManager
    757 ?        00:00:00 lightdm
    798 ?        00:00:00 bluetoothd
    869 ?        00:00:00 lightdm
    887 ?        00:00:00 systemd
    888 ?        00:00:00 (sd-pam)
    905 ?        00:00:00 pipewire-pulse
    906 ?        00:20:11 wayfire
    917 ?        00:00:04 dbus-daemon
    921 ?        00:00:00 rtkit-daemon
    972 ?        00:00:00 ssh-agent
   1011 ?        00:00:00 krfcommd
   1016 ?        00:00:00 sh
   1018 ?        00:00:00 wfrespawn
   1019 ?        00:00:00 sh
   1022 ?        00:00:00 wfrespawn
   1027 ?        00:00:03 applet.py
   1032 ?        00:00:00 polkit-mate-aut
   1055 ?        00:01:28 pcmanfm
   1056 ?        00:02:45 wf-panel-pi
   1113 tty1     00:00:00 login
   1124 ?        00:00:00 gvfsd
   1137 tty1     00:00:00 bash
   1141 ?        00:00:00 gvfsd-fuse
   1169 ?        00:00:00 xdg-desktop-por
   1173 ?        00:00:00 xdg-document-po
   1176 ?        00:00:00 xdg-permission-
   1182 ?        00:00:00 fusermount3
   1186 ?        00:00:00 xdg-desktop-por
   1196 ?        00:00:00 gvfs-udisks2-vo
   1204 ?        00:00:00 gvfs-mtp-volume
   1210 ?        00:00:00 gvfs-goa-volume
   1214 ?        00:00:01 gvfs-afc-volume
   1218 ?        00:00:00 gnome-keyring-d
   1223 ?        00:00:00 gvfs-gphoto2-vo
   1224 ?        00:00:00 gnome-keyring-d
   1237 ?        00:00:00 gvfsd-trash
   1247 ?        00:00:00 menu-cached
   1363 ?        00:00:00 pipewire
   1365 ?        00:00:00 wireplumber
   1414 ?        00:00:00 xdg-desktop-por
   1832 ?        00:00:06 dconf-service
   1897 ?        00:00:00 cupsd
   1917 ?        00:00:00 cups-browsed
   1954 ?        00:00:00 gvfsd-metadata
   2089 ?        00:04:15 lxterminal
   2100 pts/0    00:00:00 bash
   5961 pts/1    00:00:00 bash
   6902 pts/3    00:00:00 bash
  11402 ?        00:00:00 gvfsd-network
  11423 ?        00:00:00 gvfsd-dnssd
  11976 ?        00:41:59 mousepad
  12935 pts/4    00:00:00 bash
  18660 ?        00:00:00 thttpd_wrapper
  33084 ?        00:01:22 thttpd
  37180 ?        00:00:00 kworker/0:1H-mmc_complete
  42443 ?        00:00:00 kworker/0:2-mm_percpu_wq
  42653 ?        00:00:00 kworker/1:2-mm_percpu_wq
  42668 ?        00:00:09 kworker/u8:4-events_unbound
  43204 ?        00:00:00 kworker/2:2H
  43214 ?        00:00:00 kworker/1:0-events
  43716 ?        00:00:00 kworker/3:0-mm_percpu_wq
  43864 ?        00:00:00 kworker/2:2-events
  44099 ?        00:00:00 kworker/0:0-events
  44355 ?        00:00:00 kworker/2:1-events
  44398 ?        00:00:00 kworker/3:2H
  44511 ?        00:00:00 kworker/0:0H
  44609 ?        00:00:00 kworker/3:1
  44855 ?        00:00:00 kworker/1:3-events_power_efficient
  44975 ?        00:00:02 kworker/u8:2-events_unbound
  45085 ?        00:00:00 kworker/1:0H
  45270 ?        00:00:01 kworker/u8:3-events_unbound
  45306 ?        00:00:00 kworker/2:0-mm_percpu_wq
  45377 ?        00:00:00 kworker/1:1-mm_percpu_wq
  45420 ?        00:00:00 kworker/0:1-events
  45541 ?        00:00:00 kworker/0:3
  45545 ?        00:00:00 kworker/2:3-events_freezable_power_
  45722 ?        00:00:00 kworker/0:2H
  45813 pts/0    00:00:00 ps
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ date   ### 5047
Wed Dec 13 10:22:00 PM MST 2023
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ df -H   ### 5052
Filesystem      Size  Used Avail Use% Mounted on
udev            1.8G     0  1.8G   0% /dev
tmpfs           398M  1.4M  397M   1% /run
/dev/mmcblk0p2   30G  6.6G   22G  23% /
tmpfs           2.0G  275k  2.0G   1% /dev/shm
tmpfs           5.3M   13k  5.3M   1% /run/lock
/dev/mmcblk0p1  535M   76M  459M  15% /boot/firmware
tmpfs           398M   50k  398M   1% /run/user/1000
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ ls -al   ### This is to check if anything got added here like a touch number or the public_html symbolic link.   ### 5064
total 13700
drwx------ 19 pi   pi      4096 Dec 13 20:50  .
drwxr-xr-x 12 root root    4096 Dec 13 21:56  ..
-rw-r--r--  1 pi   pi      2247 Dec  9 15:13  2023-12-09-elinks-test
-rw-r--r--  1 pi   pi       540 Dec 13 20:37  adding-users.txt
-rw-r--r--  1 pi   pi       540 Dec 13 20:50 'adding-users.txt   ### 3790'
-rw-r--r--  1 pi   pi       544 Dec 13 20:34 'adding-users.txt   ### 3790~'
-rw-------  1 pi   pi      9875 Dec 13 16:04  .bash_history
-rw-r--r--  1 pi   pi       220 Oct  9 21:39  .bash_logout
-rw-r--r--  1 pi   pi      3523 Oct  9 21:39  .bashrc
drwxr-xr-x  2 pi   pi      4096 Oct  9 21:49  Bookshelf
drwx------  6 pi   pi      4096 Dec  9 15:33  .cache
drwxr-xr-x 15 pi   pi      4096 Dec  7 16:59  .config
drwxr-xr-x  2 pi   pi      4096 Dec  7 16:59  Desktop
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09  Documents
drwxr-xr-x  3 pi   pi      4096 Dec 12 15:03  Downloads
drwx------  2 pi   pi      4096 Dec 13 17:32  .elinks
-rw-r--r--  1 pi   pi       595 Dec 13 15:51  elinks-a0-http---localhost-
drwxr-xr-x  7 pi   pi      4096 Dec 13 22:23  freedom
-rw-r--r--  1 pi   pi   6805716 Dec  7 16:29  freedom.zip
-rw-r--r--  1 pi   pi   6805716 Dec  9 15:09  freedom.zip.1
-rw-------  1 pi   pi        20 Dec 13 18:23  .lesshst
-rw-r--r--  1 pi   pi     19584 Dec 13 17:36  line-2967-site-192.168.1.188.txt
-rw-r--r--  1 pi   pi       816 Dec 13 17:29  line-2967-site-192.168.1.188.txt~
drwxr-xr-x  4 pi   pi      4096 Oct  9 22:09  .local
drwx------  4 pi   pi      4096 Dec  9 15:33  .mozilla
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09  Music
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09  Pictures
drwx------  3 pi   pi      4096 Oct  9 22:10  .pp_backup
-rw-r--r--  1 pi   pi       807 Oct  9 21:39  .profile
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09  Public
-rw-r--r--  1 pi   pi         0 Oct  9 22:09  .sudo_as_admin_successful
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09  Templates
drwxr-xr-x  3 pi   pi      4096 Dec 13 20:31  thttpd
drwxr-xr-x  2 pi   pi      4096 Oct  9 22:09  Videos
-rw-------  1 pi   pi        56 Dec  9 22:11  .Xauthority
-rw-------  1 pi   pi    143448 Dec 13 22:24  .xsession-errors
-rw-------  1 pi   pi    102311 Dec  9 22:11  .xsession-errors.old
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ ls -al /home/local/sbin   ### 5106
total 204
drwxr-xr-x 4 root root   4096 Dec 13 19:39 .
drwxr-xr-x 5 root root   4096 Dec  9 18:36 ..
-rwxr-xr-- 1 pi   pi      185 Aug 31  2021 datelog
-r-xr-xr-- 1 pi   pi      185 Aug 31  2021 datelog~
-rwxr-xr-- 1 pi   pi      385 Aug 31  2021 dead-thttpd
-r-xr-xr-- 1 pi   pi      385 Aug 31  2021 dead-thttpd~
-rwxr-xr-x 1 root root  72280 Dec  9 18:36 htpasswd
-rwxr-sr-x 1 root www   71464 Dec  9 18:36 makeweb
drwxr-xr-x 2 pi   pi     4096 Jul 12  2022 os-debug
-r-xr-xr-x 1 root root   2878 Dec  9 18:36 syslogtocern
-r-xr-xr-x 1 bin  bin  157800 Dec  9 18:36 thttpd
drwxr-xr-x 3 pi   pi     4096 Jul 12  2022 thttpd-extras
-rwxr-xr-- 1 pi   pi      153 Aug 31  2021 thttpd_wrapper
pi@raspberrypi:~ $ 

#	Notice that the binary "thttpd" file on a 64-bit OS is only 157,800 bytes!   ### 5123

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

reboot


    PID TTY          TIME CMD
      1 ?        00:00:02 systemd
      2 ?        00:00:00 kthreadd
      3 ?        00:00:00 rcu_gp
      4 ?        00:00:00 rcu_par_gp
      5 ?        00:00:00 slub_flushwq
      6 ?        00:00:00 netns
      7 ?        00:00:00 kworker/0:0-mm_percpu_wq
      8 ?        00:00:00 kworker/0:0H-mmc_complete
      9 ?        00:00:01 kworker/u8:0-events_unbound
     10 ?        00:00:00 mm_percpu_wq
     11 ?        00:00:00 rcu_tasks_kthread
     12 ?        00:00:00 rcu_tasks_rude_kthread
     13 ?        00:00:00 rcu_tasks_trace_kthread
     14 ?        00:00:00 ksoftirqd/0
     15 ?        00:00:00 rcu_preempt
     16 ?        00:00:00 migration/0
     17 ?        00:00:00 cpuhp/0
     18 ?        00:00:00 cpuhp/1
     19 ?        00:00:00 migration/1
     20 ?        00:00:00 ksoftirqd/1
     21 ?        00:00:00 kworker/1:0-events
     22 ?        00:00:00 kworker/1:0H-events_highpri
     23 ?        00:00:00 cpuhp/2
     24 ?        00:00:00 migration/2
     25 ?        00:00:00 ksoftirqd/2
     26 ?        00:00:00 kworker/2:0-events
     27 ?        00:00:00 kworker/2:0H-kblockd
     28 ?        00:00:00 cpuhp/3
     29 ?        00:00:00 migration/3
     30 ?        00:00:00 ksoftirqd/3
     31 ?        00:00:00 kworker/3:0-events_long
     32 ?        00:00:00 kworker/3:0H-events_highpri
     33 ?        00:00:00 kdevtmpfs
     34 ?        00:00:00 inet_frag_wq
     35 ?        00:00:00 kworker/0:1-events
     36 ?        00:00:00 kauditd
     37 ?        00:00:00 kworker/0:2-events
     38 ?        00:00:00 khungtaskd
     39 ?        00:00:00 kworker/u8:1-events_unbound
     40 ?        00:00:00 oom_reaper
     41 ?        00:00:00 writeback
     42 ?        00:00:00 kcompactd0
     43 ?        00:00:00 kintegrityd
     44 ?        00:00:00 kblockd
     45 ?        00:00:00 blkcg_punt_bio
     46 ?        00:00:00 watchdogd
     47 ?        00:00:00 kworker/u8:2-events_unbound
     48 ?        00:00:00 kworker/3:1-events_long
     49 ?        00:00:00 kworker/3:1H-kblockd
     50 ?        00:00:00 rpciod
     51 ?        00:00:00 xprtiod
     52 ?        00:00:00 kworker/u8:3-events_unbound
     53 ?        00:00:00 kworker/1:1-cgroup_destroy
     54 ?        00:00:00 kworker/2:1-cgroup_destroy
     55 ?        00:00:00 kswapd0
     56 ?        00:00:00 nfsiod
     57 ?        00:00:00 kthrotld
     59 ?        00:00:00 kworker/3:2-events_long
     62 ?        00:00:00 kworker/3:3-events
     63 ?        00:00:00 kworker/3:4-events_freezable_power_
     64 ?        00:00:00 kworker/3:5-events
     65 ?        00:00:00 irq/31-aerdrv
     66 ?        00:00:00 hwrng
     67 ?        00:00:00 iscsi_conn_clea
     68 ?        00:00:00 nvme-wq
     69 ?        00:00:00 nvme-reset-wq
     70 ?        00:00:00 nvme-delete-wq
     72 ?        00:00:00 DWC Notificatio
     73 ?        00:00:00 uas
     74 ?        00:00:00 vchiq-slot/0
     75 ?        00:00:00 vchiq-recy/0
     76 ?        00:00:00 vchiq-sync/0
     83 ?        00:00:00 zswap-shrink
     84 ?        00:00:00 kworker/u9:0-brcmf_wq/mmc1:0001:1
    103 ?        00:00:00 kworker/2:2-events
    104 ?        00:00:00 kworker/0:3-events
    105 ?        00:00:00 sdhci
    106 ?        00:00:00 irq/37-mmc0
    110 ?        00:00:00 kworker/2:3-events_power_efficient
    124 ?        00:00:00 mmc_complete
    126 ?        00:00:00 kworker/2:1H-kblockd
    127 ?        00:00:00 kworker/0:1H-mmc_complete
    136 ?        00:00:00 kworker/0:4-mm_percpu_wq
    154 ?        00:00:00 kworker/1:1H-kblockd
    178 ?        00:00:00 kworker/1:2-mm_percpu_wq
    179 ?        00:00:00 kworker/0:2H-mmc_complete
    182 ?        00:00:00 kworker/1:2H
    183 ?        00:00:00 v3d_bin
    184 ?        00:00:00 v3d_render
    185 ?        00:00:00 v3d_tfu
    186 ?        00:00:00 v3d_csd
    187 ?        00:00:00 v3d_cache_clean
    188 ?        00:00:00 kworker/2:2H
    192 ?        00:00:00 irq/40-vc4 hdmi hpd connected
    193 ?        00:00:00 irq/41-vc4 hdmi hpd disconnected
    194 ?        00:00:00 cec-vc4-hdmi-0
    195 ?        00:00:00 irq/42-vc4 hdmi cec rx
    196 ?        00:00:00 irq/43-vc4 hdmi cec tx
    197 ?        00:00:00 irq/44-vc4 hdmi hpd connected
    198 ?        00:00:00 irq/45-vc4 hdmi hpd disconnected
    199 ?        00:00:00 cec-vc4-hdmi-1
    200 ?        00:00:00 irq/46-vc4 hdmi cec rx
    201 ?        00:00:00 irq/47-vc4 hdmi cec tx
    202 ?        00:00:00 card1-crtc0
    203 ?        00:00:00 card1-crtc1
    204 ?        00:00:00 card1-crtc2
    205 ?        00:00:00 card1-crtc3
    206 ?        00:00:00 card1-crtc4
    207 ?        00:00:00 card1-crtc5
    232 ?        00:00:00 kworker/3:2H
    235 ?        00:00:00 jbd2/mmcblk0p2-8
    236 ?        00:00:00 ext4-rsv-conver
    252 ?        00:00:00 mld
    253 ?        00:00:00 ipv6_addrconf
    291 ?        00:00:00 systemd-journal
    311 ?        00:00:00 kworker/2:4-events
    315 ?        00:00:00 systemd-udevd
    317 ?        00:00:00 kworker/1:3-events_power_efficient
    400 ?        00:00:00 vchiq-keep/0
    409 ?        00:00:00 SMIO
    415 ?        00:00:00 systemd-timesyn
    460 ?        00:00:00 mmal-vchiq
    464 ?        00:00:00 irq/53-feb10000.codec
    465 ?        00:00:00 mmal-vchiq
    468 ?        00:00:00 mmal-vchiq
    473 ?        00:00:00 mmal-vchiq
    477 ?        00:00:00 mmal-vchiq
    479 ?        00:00:00 mmal-vchiq
    484 ?        00:00:00 cfg80211
    488 ?        00:00:00 mmal-vchiq
    521 ?        00:00:01 kworker/u9:1-brcmf_wq/mmc1:0001:1
    522 ?        00:00:00 kworker/u9:2
    523 ?        00:00:00 accounts-daemon
    530 ?        00:00:00 avahi-daemon
    531 ?        00:00:00 cron
    532 ?        00:00:00 dbus-daemon
    541 ?        00:00:00 avahi-daemon
    543 ?        00:00:00 polkitd
    548 ?        00:00:00 brcmf_wq/mmc1:0
    552 ?        00:00:00 brcmf_wdog/mmc1:0001:1
    576 ?        00:00:00 systemd-logind
    594 ?        00:00:00 thd
    600 ?        00:00:00 udisksd
    667 ?        00:00:00 ModemManager
    671 ?        00:00:00 NetworkManager
    672 ?        00:00:00 wpa_supplicant
    730 ?        00:00:00 cupsd
    742 ?        00:00:00 lightdm
    796 ?        00:00:00 bluetoothd
    859 ?        00:00:00 lightdm
    885 ?        00:00:00 systemd
    886 ?        00:00:00 (sd-pam)
    903 ?        00:00:00 pipewire-pulse
    904 ?        00:00:05 wayfire
    918 ?        00:00:00 dbus-daemon
    923 ?        00:00:00 rtkit-daemon
    971 ?        00:00:00 ssh-agent
   1010 ?        00:00:00 krfcommd
   1015 ?        00:00:00 sh
   1016 ?        00:00:00 wfrespawn
   1018 ?        00:00:00 sh
   1021 ?        00:00:00 wfrespawn
   1026 ?        00:00:00 applet.py
   1032 ?        00:00:00 polkit-mate-aut
   1054 ?        00:00:01 wf-panel-pi
   1055 ?        00:00:01 pcmanfm
   1074 ?        00:00:00 cups-browsed
   1103 ?        00:00:00 thttpd_wrapper
   1110 ?        00:00:00 thttpd
   1111 tty1     00:00:00 login
   1126 ?        00:00:00 gvfsd
   1136 tty1     00:00:00 bash
   1140 ?        00:00:00 gvfsd-fuse
   1168 ?        00:00:00 xdg-desktop-por
   1172 ?        00:00:00 xdg-document-po
   1175 ?        00:00:00 xdg-permission-
   1183 ?        00:00:00 fusermount3
   1187 ?        00:00:00 xdg-desktop-por
   1192 ?        00:00:00 gvfs-udisks2-vo
   1201 ?        00:00:00 gvfs-mtp-volume
   1207 ?        00:00:00 gvfs-goa-volume
   1213 ?        00:00:00 gvfs-afc-volume
   1219 ?        00:00:00 gvfs-gphoto2-vo
   1222 ?        00:00:00 gnome-keyring-d
   1224 ?        00:00:00 gnome-keyring-d
   1236 ?        00:00:00 gvfsd-trash
   1245 ?        00:00:00 menu-cached
   1330 ?        00:00:00 kworker/u8:4
   1362 ?        00:00:00 pipewire
   1365 ?        00:00:00 wireplumber
   1387 ?        00:00:00 xdg-desktop-por
   1451 ?        00:00:06 packagekitd
   1813 ?        00:00:11 mousepad
   1830 ?        00:00:00 dconf-service
   1862 ?        00:00:00 gvfsd-network
   1877 ?        00:00:00 gvfsd-dnssd
   1962 ?        00:00:00 lxterminal
   1973 pts/0    00:00:00 bash
   2039 pts/0    00:00:00 ps
pi@raspberrypi:~ $ 

#   1103 ?        00:00:00 thttpd_wrapper
#   1110 ?        00:00:00 thttpd
#   1111 tty1     00:00:00 login

#	Notice that thttpd_wrapper and thttpd both automatically loaded before the login was started!   ### 5336

#	*****************************  ### 5338   (4603) 2023-11-24-new-Pi-OS-thttpd-build.txt


pi@raspberrypi:~ $ cd /etc   ### 5341
pi@raspberrypi:/etc $ 
pi@raspberrypi:/etc $ 


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

#	(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.  ### 5349

#	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.   ### 5351

#	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”.   ### 5353

#	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!”   ### 5355


#	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.   ### 5358


# *****************************   ### 5361

#	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!   ### 5363


pi@raspberrypi:/etc $ cd   ### 5366
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ 


pi@raspberrypi:~ $ cat ~/freedom/news.netcraft.com/news.netcraft.com.txt   ### 5372
# *****************************
news.netcraft.com

	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 - January 2018 Web Server Survey - 19th January, 2018

In the January 2018 survey we received responses from 1,805,260,010 sites across 213,053,157 unique domain names and 7,228,005 web-facing computers. This reflects a gain of 214,000 computers, but only 183,000 domains. Overall hostname growth was 71 million, although the number of active sites fell slightly, by 311,000.


# Https://news.netcraft.com - February 2018 Web Server Survey - 13th February, 2018

In the February 2018 survey we received responses from 1,838,596,056 sites across 214,036,874 unique domain names and 7,290,968 web-facing computers. This reflects a gain of 63,000 computers, and nearly a million additional domains. Overall hostname growth was 33 million, and the number of active sites grew by 9.3 million.


# Https://news.netcraft.com - March 2018 Web Server Survey - 27th March, 2018

In the March 2018 survey we received responses from 1,770,411,187 sites across 214,774,438 unique domain names and 7,333,606 web-facing computers. This reflects a gain of 43,000 computers, and 738,000 additional domains. The total number of hostnames fell by 68.2 million, and the number of active sites fell by 3.4 million.


# Https://news.netcraft.com - April 2018 Web Server Survey - 26th April, 2018

In the April 2018 survey we received responses from 1,783,239,123 sites across 214,513,048 unique domain names and 7,387,066 web-facing computers. This reflects a gain of 12.8 million sites and 53,500 computers, but a loss of 261,000 domains.


# Https://news.netcraft.com - May 2018 Web Server Survey - 29th May, 2018

In the May 2018 survey we received responses from 1,584,940,345 sites, 217,875,435 unique domains, and 7,452,628 web-facing computers. This reflects a loss of 198 million sites, but a gain of 3.36 million domains and 65,600 web-facing computers.


# Https://news.netcraft.com - June 2018 Web Server Survey - 13th June, 2018

In the June 2018 survey we received responses from 1,630,322,579 sites, 217,776,658 unique domains, and 7,614,764 web-facing computers. This reflects a gain of 45 million sites and 162,000 web-facing computers, but a loss of 98,800 domains.


# Https://news.netcraft.com - July 2018 Web Server Survey = 19th July, 2018

In the July 2018 survey we received responses from 1,663,673,364 sites, 220,573,018 unique domains, and 7,734,417 web-facing computers. This reflects a gain of 33.4 million sites, 2.80 million domains, and 120k web-facing computers.


# Https://news.netcraft.com - August 2018 Web Server Survey - 24th August, 2018

In the August 2018 survey we received responses from 1,661,467,123 sites, 221,524,704 unique domains, and 7,758,309 web-facing computers. This reflects a loss of 2.21 million sites, but a gain of 952k domains and 23.9k web-facing computers.


# Https://news.netcraft.com - September 2018 Web Server Survey - 24th September, 2018

In the September 2018 survey we received responses from 1,642,339,233 sites, 222,628,534 unique domains, and 7,785,976 web-facing computers. This reflects gains of 1.1 million unique domains and 28,000 web-facing computers, but a loss of 19 million sites. 


# Https://news.netcraft.com - October 2018 Web Server Survey - 29th October, 2018

In the October 2018 survey we received responses from 1,673,535,333 sites, 225,042,277 unique domains, and 7,927,795 web-facing computers. This reflects a gain of 31 million sites, 2.4 million domains and 142 thousand web-facing computers.


# Https://news.netcraft.com - November 2018 Web Server Survey - 26th November, 2018

In the November 2018 survey we received responses from 1,652,185,816 sites, 226,752,928 unique domains, and 8,048,899 web-facing computers. This reflects a loss of 21.3 million sites, but a gain of 1.7 million domains and 121 thousand web-facing computers.


# Https://news.netcraft.com - December 2018 Web Server Survey - 17th December, 2018

In the December 2018 survey we received responses from 1,656,556,205 sites, 227,839,033 unique domains, and 8,147,795 web-facing computers. This reflects a gain of 4.37 million sites, 1.09 million domains, and 98.9k web-facing computers.


# Https://news.netcraft.com - January 2019 Web Server Survey - 24th January, 2019

In the January 2019 survey we received responses from 1,518,207,412 sites, 228,607,903 unique domains, and 8,209,715 web-facing computers. This reflects a loss of 138 million sites, and gains of 768.9k domains, and 61.9k web-facing computers.


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

In the February 2019 survey we received responses from 1,477,803,927 sites, 229,586,773 unique domains, and 8,366,753 web-facing computers. This reflects a loss of 40.4 million sites, and gains of 979k domains, and 157k web-facing computers. 


# Https://news.netcraft.com - March 2019 Web Server Survey - 28th March, 2019

In the March 2019 survey we received responses from 1,462,021,378 sites, 232,162,099 unique domains, and 8,526,624 web-facing computers. This reflects a loss of 15.8 million sites, but a gain of 2.57 million domains and 160k web-facing computers.


# Https://news.netcraft.com - April 2019 Web Server Survey - 22nd April, 2019

In the April 2019 survey we received responses from 1,445,266,139 sites across 233,886,577 unique domain names and 8,613,630 web-facing computers. This reflects a loss of 16.8 million sites, but a gain of 1.72 million domains and 87,000 computers.


# Https://news.netcraft.com - May 2019 Web Server Survey - 10th May, 2019

In the May 2019 survey we received responses from 1,326,664,693 sites across 235,011,143 unique domain names and 8,726,985 web-facing computers. Although this reflects a gain of 1.12 million domains and 113,000 computers, there has been a loss of 119 million sites.


# Https://news.netcraft.com - June 2019 Web Server Survey - 17th June, 2019

In the June 2019 survey we received responses from 1,333,421,275 sites across 236,991,999 unique domain names and 8,840,331 web-facing computers. This reflects gains of 6.76 million sites, 1.98 million domains, and 113,000 computers.


# Https://news.netcraft.com - July 2019 Web Server Survey - 26th July, 2019

In the July 2019 survey we received responses from 1,395,897,118 sites across 238,145,990 unique domain names and 8,938,144 web-facing computers. This reflects gains of 62.5 million sites, 1.15 million domains, and 98,000 computers.


# Https://news.netcraft.com - August 2019 Web Server Survey - 15th August, 2019

In the August 2019 survey we received responses from 1,271,920,923 sites across 239,441,736 unique domain names and 8,948,887 web-facing computers. This reflects a large loss of 124 million sites, but a gain of 1.30 million domains and 10,700 computers.


# Https://news.netcraft.com - September 2019 Web Server Survey - 27th September, 2019

In the September 2019 survey we received responses from 1,291,178,101 sites across 241,131,705 unique domain names and 9,068,313 web-facing computers. This reflects a gain of 19 million sites, 1.69 million domains and 119,000 computers.


# Https://news.netcraft.com - October 2019 Web Server Survey - 24th October, 2019

In the October 2019 survey we received responses from 1,300,884,420 sites across 241,553,033 unique domain names and 9,045,029 web-facing computers. This reflects a gain of 9.71 million sites, 421,000 domains and a loss of 23,000 computers.


# Https://news.netcraft.com - November 2019 Web Server Survey - 27th November, 2019

In the November 2019 survey we received responses from 1,308,343,327 sites across 243,734,379 unique domain names and 9,274,744 web-facing computers. This reflects a gain of 7.46 million sites, 2.18 million domains and 230,000 computers.


# Https://news.netcraft.com - December 2019 Web Server Survey - 10th December, 2019

In the December 2019 survey we received responses from 1,268,289,402 sites across 243,753,534 unique domain names and 9,430,985 web-facing computers. This reflects a loss of 40.1 million sites, but a gain of 19,200 domains and 156,000 computers. 


# Https://news.netcraft.com - January 2020 Web Server Survey - 21st January, 2020

In the January 2020 survey we received responses from 1,295,973,827 sites across 249,618,033 unique domain names and 9,576,845 web-facing computers. This reflects a gain of 27.7 million sites, 5.86 million domains, and 146,000 computers.


# Https://news.netcraft.com - February 2020 Web Server Survey - 20th February, 2020

In the February 2020 survey we received responses from 1,260,909,305 sites across 254,192,929 unique domains and 9,564,965 web-facing computers. This reflects a loss of 35.1 million sites and 11,900 computers, but a gain of 4.57 million domains.


# Https://news.netcraft.com - March 2020 Web Server Survey - 20th March, 2020

In the March 2020 survey we received responses from 1,263,025,546 sites across 257,194,796 unique domains and 9,659,223 web-facing computers. This reflects a gain of 94,300 computers, 2.12 million sites and 3.00 million domains.


# Https://news.netcraft.com - April 2020 Web Server Survey - 8th April, 2020

In the April 2020 survey we received responses from 1,246,121,153 sites across 260,089,947 unique domains and 9,669,267 web-facing computers. This reflects a gain of 10,000 computers and 2.90 million domains, but a loss of 16.9 million sites.


# Https://news.netcraft.com - May 2020 Web Server Survey - 26th May, 2020

In the May 2020 survey we received responses from 1,238,024,212 sites across 261,192,350 unique domains and 9,892,834 web-facing computers. This reflects a gain of 224,000 computers and 1.10 million domains, but a loss of 8.10 million sites.


# Https://news.netcraft.com - June 2020 Web Server Survey - 25th June, 2020

In the June 2020 survey we received responses from 1,224,760,416 sites across 262,406,750 unique domains and 10,042,047 web-facing computers. This reflects a gain of 1.21 million domains and 149,000 computers, but a loss of 13.3 million sites.


# Https://news.netcraft.com - July 2020 Web Server Survey - 27th July, 2020

In the July 2020 survey we received responses from 1,234,228,567 sites across 260,658,118 unique domains and 10,221,919 web-facing computers. This represents a gain of 9.47 million sites and 180,000 computers, but a loss of 1.75 million domains.


# Https://news.netcraft.com - August 2020 Web Server Survey - 26th August, 2020

In the August 2020 survey we received responses from 1,230,576,586 sites across 261,821,287 unique domains and 10,349,486 web-facing computers. This represents a loss of 3.65 million sites, but a gain of 1.16 million domains and 128,000 computers.


# Https://news.netcraft.com - September 2020 Web Server Survey - 23rd September, 2020

In the September 2020 survey we received responses from 1,196,298,727 sites, across 264,284,761 unique domains and 10,338,585 web-facing computers. Compared with last month, this is a loss of 34,277,859 sites and 10,901 web-facing computers, but a gain of 2,463,474 unique domains.


# Https://news.netcraft.com - October 2020 Web Server Survey - 21st October, 2020

In the October 2020 survey we received responses from 1,205,797,275 sites across 264,098,084 unique domains and 10,449,223 web-facing computers. This reflects a gain of 9.50 million hostnames and 111,000 computers, but a loss of 187,000 domains.


# Https://news.netcraft.com - November 2020 Web Server Survey - 30th November, 2020

In the November 2020 survey we received responses from 1,229,948,224 sites across 263,787,870 unique domains and 10,564,577 web-facing computers. This reflects a gain of 24.2 million sites and 115,000 computers, but a loss of 310,000 domains.


# Https://news.netcraft.com - December 2020 Web Server Survey - 22nd December, 2020

In the December 2020 survey we received responses from 1,228,111,563 sites across 263,413,876 unique domains and 10,553,965 web-facing computers. The reflects a loss of 1.84 million sites, 374,000 domains, and 10,600 computers.


# Https://news.netcraft.com - January 2021 Web Server Survey - 28th January, 2021

In the January 2021 survey we received responses from 1,197,982,359 sites across 262,949,225 unique domains and 10,649,817 web-facing computers. This reflects a gain of 95,900 computers, but a loss of 30.13 million sites and 465,000 domains.


# Https://news.netcraft.com - February 2021 Web Server Survey - 26th February, 2021

In the February 2021 survey we received responses from 1,204,252,411 sites across 263,042,054 unique domains and 10,766,606 web-facing computers. This reflects a gain of 6,270,052 sites, 92,829 domains, and 116,789 computers.


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

In the March 2021 survey we received responses from 1,187,527,949 sites across 263,355,616 unique domains and 10,847,682 web-facing computers. This reflects a loss of 16,724,462 sites, but a gain of 313,561 domains and 81,076 computers.


# Https://news.netcraft.com - April 2021 Web Server Survey - 30th April, 2021

In the April 2021 survey we received responses from 1,212,139,815 sites across 264,469,666 unique domains and 10,939,637 web facing computers. This is an increase of 24,611,866 sites, 1,114,050 domains and 91,955 computers.


# Https://news.netcraft.com - May 2021 Web Server Survey - 31st May, 2021

In the May 2021 survey we received responses from 1,218,423,991 sites across 259,596,021 unique domains and 11,051,830 web-facing computers. This reflects a gain of 6.28 million sites and 112,000 computers, but a loss of 4.87 million domains.


# Https://news.netcraft.com - June 2021 Web Server Survey - 29th June, 2021

In the June 2021 survey we received responses from 1,213,277,377 sites across 260,108,646 unique domains and 11,098,973 web-facing computers. This reflects a loss of 5.15 million sites, but a gain of 513,000 domains and 47,100 web-facing computers.


# Https://news.netcraft.com - July 2021 Web Server Survey - 26th July, 2021

In the July 2021 survey we received responses from 1,216,435,462 sites across 262,098,666 unique domains and 11,260,130 web-facing computers. This reflects a gain of 3.16 million sites, 1.99 million domains, and 161,000 computers.


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 - September 2021 Web Server Survey - 29th September, 2021

In the September 2021 survey we received responses from 1,188,038,392 sites across 264,360,621 unique domains and 11,368,033 web-facing computers. This reflects a loss of 23.4 million sites, but a gain of 627,000 domains and 40,300 computers.


# Https://news.netcraft.com - October 2021 Web Server Survey - 15th October, 2021

In the October 2021 survey we received responses from 1,179,448,021 sites across 265,426,928 unique domains and 11,388,826 web-facing computers. This reflects a loss of 8.59 million sites, but a gain of 1.07 million domains and 20,800 computers.


# Https://news.netcraft.com - November 2021 Web Server Survey - 23rd November, 2021

In the November 2021 survey we received responses from 1,175,392,792 sites across 267,027,794 unique domains and 11,525,855 web-facing computers. This reflects a loss of 4.06 million sites, but a gain of 1.60 million domains and 137,000 computers.


# Https://news.netcraft.com - December 2021 Web Server Survey - 22nd December, 2021

In the December 2021 survey we received responses from 1,168,864,866 sites across 268,328,184 unique domains and 11,669,818 web-facing computers. This represents a loss of 6.53 million sites, but a gain of 1.30 million domains and 144,000 computers.


# Https://news.netcraft.com - January 2022 Web Server Survey - 17th January, 2022

In the January 2022 survey we received responses from 1,167,715,133 sites across 269,835,071 unique domains and 11,700,892 web-facing computers. This reflects a loss of 1.15 million sites, but a gain of 1.51 million domains and 31,100 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.


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

In the July 2022 survey we received responses from 1,139,467,659 sites across 271,728,559 unique domains and 12,341,172 web-facing computers. This reflects a loss of 7.5 million sites and 1.3 million domains, but a gain of 116,386 computers.


# Https://news.netcraft.com - August 2022 Web Server Survey - 26th August, 2022

In the August 2022 survey we received responses from 1,135,075,578 sites across 271,740,771 unique domains and 12,365,527 web-facing computers. This reflects a loss of 4.4 million sites, but a gain of 12,212 domains and 24,355 computers.


# Https://news.netcraft.com - September 2022 Web Server Survey - 22nd September, 2022

In the September 2022 survey we received responses from 1,129,251,133 sites across 271,625,260 unique domains, and 12,252,171 web-facing computers. This month all three metrics have decreased since August, with a loss of 5.82 million sites, 115,512 unique domains and 113,356 web-facing computers.


# Https://news.netcraft.com - October 2022 Web Server Survey - 18th October, 2022

In the October 2022 survey we received responses from 1,130,378,382 sites across 271,883,623 unique domains, and 12,299,940 web-facing computers. This reflects a gain of 1.13 million sites, 258,363 unique domains, and 47,769 web-facing computers.


# Https://news.netcraft.com - November 2022 Web Server Survey - 10th November, 2022

In the November 2022 survey we received responses from 1,135,089,912 sites across 271,689,143 domains and 12,306,625 web-facing computers. This reflects a gain of 4.7 million sites, a loss of 194,480 domains, and a gain of 6,685 web-facing computers.


# Https://news.netcraft.com - December 2022 Web Server Survey - 20th December, 2022

In the December 2022 survey we received responses from 1,125,374,532 sites across 271,238,722 domains and 12,234,425 web-facing computers. This reflects a loss of 9.7 million sites, 450,421 domains, and 72,200 web-facing computers.


# Https://news.netcraft.com - January 2023 Web Server Survey - 27th January, 2023

In the January 2023 survey we received responses from 1,132,268,801 sites across 270,967,923 unique domains, and 12,156,700 web-facing computers. This reflects a gain of 6,894,269 sites, but a loss of 270,799 domains and 77,725 computers.


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

In the February 2023 survey we received responses from 1,127,630,293 sites across 270,727,775 unique domains, and 12,142,793 web-facing computers. This reflects a loss of 4,638,508 sites, 240,148 domains and 13,907 computers.


# Https://news.netcraft.com - March 2023 Web Server Survey - 23rd March, 2023

In the March 2023 survey we received responses from 1,116,018,952 sites across 269,281,081 domains and 12,106,182 web-facing computers. This reflects a loss of 11.6 million sites, 1.4 million domains, and 36,610 web-facing computers.


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

In the April 2023 survey we received responses from 1,115,422,029 sites across 272,511,659 domains and 12,089,407 web-facing computers. This reflects a gain of 3.2 million domains but a loss of 596,923 sites and 16,775 web-facing computers.


# Https://news.netcraft.com - May 2023 Web Server Survey - 26th May, 2023

In the May 2023 survey we received responses from 1,109,384,426 sites across 271,534,718 domains and 12,037,194 web-facing computers. This reflects a loss of 6.0 million sites, 976,941 domains, and 52,213 web-facing computers.


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

In the June 2023 survey we received responses from 1,106,671,903 sites across 255,487,423 domains and 12,106,503 web-facing computers. This reflects a loss of 2.7 million sites, 16.0 million domains, and an increase of 69,309 web-facing computers.


# Https://news.netcraft.com - July 31, 2023 - July 2023 Web Server Survey

In the July 2023 survey we received responses from 1,101,218,364 sites across 255,719,341 domains and 12,125,956 web-facing computers. This reflects a loss of 5.5 million sites, but a gain of 231,918 domains and 19,453 web-facing computers.


# Https://news.netcraft.com - August 28, 2023 - August 2023 Web Server Survey

In the August 2023 survey we received responses from 1,093,748,332 sites across 255,459,417 domains and 12,162,471 web-facing computers. This reflects a loss of 7.5 million sites and 259,924 domains, and a gain of 36,515 web-facing computers.


# Https://news.netcraft.com - September 29, 2023 - September 2023 Web Server Survey

In the September 2023 survey we received responses from 1,085,035,470 sites across 254,776,456 domains and 12,274,854 web-facing computers. This reflects a loss of 8.7 million sites and 682,961 domains, but a gain of 112,383 web-facing computers.


# Https://news.netcraft.com - Saturday, October 28, 2023 1:22 PM - October 2023 Web Server Survey

In the October 2023 survey we received responses from 1,093,294,946 sites across 267,962,271 domains and 12,371,536 web-facing computers. This reflects an increase of 8.3 million sites, 13.2 million domains, and 96,682 web-facing computers.


# Https://news.netcraft.com - November 24, 2023 - November 2023 Web Server Survey

In the November 2023 survey we received responses from 1,092,141,942 sites across 269,029,841 domains and 12,483,638 web-facing computers. This reflects a loss of 1.2 million sites, a gain of 1.1 million domains, and a gain of 112,102 web-facing computers.


# Https://news.netcraft.com - 


# *****************************
pi@raspberrypi:~ $ 


# *****************************   ### 5740


pi@raspberrypi:~ $ cat ~/freedom/router-setup.txt   ### 5743
router-setup.txt

###


### 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.
#
# *****************************
pi@raspberrypi:~ $ 

pi@raspberrypi:~ $ cat ~/freedom/ending.txt   ### 5825
#	ending.txt

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


# Why we do not use DNS and Domain Addresses due to the security problems they present!

#	http://162.250.19.7/freedom/DNS

pi@raspberrypi:~ $ ls -al ~/freedom/DNS
total 6496
drwxr-xr-x  4 pi pi    4096 Dec 14 16:11  .
drwxr-xr-x  9 pi pi    4096 Dec 14 17:32  ..
drwxr-xr-x 10 pi pi    4096 Dec 14 16:11 '2023-01-31-How Can Disrupting DNS Communications Thwart a Malware Attack _files'
-rw-r--r--  1 pi pi  620557 May 26  2023 '2023-01-31-How Can Disrupting DNS Communications Thwart a Malware Attack .html'
drwxr-xr-x  2 pi pi    4096 Dec 14 16:11 '2023-05-22-Everything You Need to Know About DNS Attacks Last Chance_files'
-rw-r--r--  1 pi pi   74523 May 26  2023 '2023-05-22-Everything You Need to Know About DNS Attacks Last Chance.html'
-rw-r--r--  1 pi pi  253202 May 26  2023 '2023-05-22-Everything You Need to Know About DNS Attacks Last Chance.pdf'
-rw-r--r--  1 pi pi 3118836 May 26  2023  fdrtechinsightsreportinfobloxmay20231683655767573.pdf
-rw-r--r--  1 pi pi 2556517 May 26  2023  may23infobloxdarkreadingpresentation1684847288354.pdf
pi@raspberrypi:~ $ 


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


     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âs Purpose - Letâs journey together.
# https://godtoolsapp.com, GodTools - Helping You Share Your Faith.
#
#
#	***************************************

pi@raspberrypi:~ $ 

