2021-09-13-Install-thttpd-Pi-400-ubuntu-21.04-desktop-arm64+raspi.txt Geany - A fast and lightweight IDE using GTK+ - Developer Tools → IDEs - ubuntu-hirsute-universe, download size: 1 MB. ( sudo apt install geany # two 1 MB files, icon looks like a little round tea pot.) I recommend installing this program 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 the lower screen was 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 took around two hours to go through the install file. 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 one has to start a different terminal and enter: "ps -e" to print out all of the PID numbers and then find the number that goes 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. ***************************** Programs that need to be added to Ubuntu for "thttpd" to compile: frank@frank-desktop:~$ frank@frank-desktop:~$ sudo apt install gcc make make-doc autoconf automake libtool flex bison gcc-doc gcc-10-doc gcc-10-locales glibc-doc whois frank@frank-desktop:~$ Adding "whois" will let you lookup IP Addersses of visitors to your "World Wide Website"! "freedom.zip" should be installed in the users "home" directory, and unzipped there to give the directory "freedom". It will probably be a good idea to change: "Firefox, Settings, General, Files and Applications, Downloads" to: "Always ask you where to save files", since we are going to be saving several different files to places besides "Downloads". I will be using (frank) to reference my "home directory" which you will have to use your own name without the "()"s. ***************************** Now it is time to change the "$PATH" so the computer can find the "thttpd" program. frank@frank-desktop:~$ frank@frank-desktop:~$ $PATH 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:~$ 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, or, I made a file "environment" that can just be copied: sudo cp -iav ~/freedom/environment /etc/environment # This will save problems in typing and saving the file. The result will be: frank@frank-desktop:~$ frank@frank-desktop:~$ $PATH 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@frank-desktop:~$sudo cp -iav ~/freedom/environment /etc/environment *****REBOOT***** frank@frank-desktop:~$ frank@frank-desktop:~$ $PATH bash: /home/local/sbin:/home/local/bin:/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:~$ # Make sure the path is right, one will need to reboot to make it active. ***************************** Another thing I do is: sudo mkdir /fd /hd /sd # This makes for handy mount points for: floppy drives (USB), hard drives (1 TB, etc.) and sd cards. When one adds a drive to Ubuntu, the bell rings and nothing shows up because it is not mounted. Doing: sudo fdisk -l # this will show the drives and their partitions. Then it is just: sudo mount /dev/sda2 /hd # This mounts the second partition of drive "sda". Then one can read the files by: cd /hd/(path or file name) ... and then where you want to go. This gives a really short path to that drive, instead of "/media/(user-name)/(drive-name)/(file-name)". I think you get the point! ***************************** "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 complain, but work, 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, so long videos would need to be split into sizes less than 2 GB. "thttpd" used to be the seventh most popular web server. Out of the box, it is read only, but can run CGI programs, which makes it safe to run on the "World Wide Web"! I moved the install from "/usr/local" to "/home/local" since "/home" is the only directory one can keep when installing a new version OS. That way all of your web site will still be intact! The original files go into directories under "/home", and the actual web pages that are served are under "/home/local/www/users/(the original directory name)" so if something happens to that page the original is still safe. This also makes it possible to make changes and then just copy them to the "public_html" link and the new page is active immediately! This is installing thttpd on a RaspberryPi 400 running ubuntu-21.04-desktop-arm64. Most of the commands can be copied from the install file and pasted to a terminal. A few things will need to be changed but most will be: copy, paste, enter. WWW pages for EVERYONE!!! To reduce the amount of work needed to install thttpd, I have copied the files from Acme.com and made some modifications. These files have been changed in thttpd-2.29, and these are the changes that were made! *****If you expand "thttpd-2.29.tar.gz" these changes will be missing!***** *****These files are in: cd ~/freedom/Acme.com/thttpd-2.29/ #***** The first change in "thttpd-2.29" in "Makefile.in" is 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" in "configure" 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. If one does an OS change, the other files that need to be in "/etc/" are: sudo cp -iav /home/local/sbin/thttpd-extras/thttpd-rotate /etc/cron.daily/thttpd-rotate # or if you are using the os-debug version, sudo cp -iav /home/local/sbin/os-debug/thttpd-rotate /etc/cron.daily/thttpd-rotate # this file needs other programs found in "os-debug" see: "readme.txt" in "os-debug". sudo cp -iav /home/local/sbin/thttpd-extras/rc.local /etc/rc.local # Make sure you don't wipe out a file that might already be there! sudo cp -iav /home/local/sbin/thttpd-extras/thttpd.sh /etc/thttpd.sh # This file pulls in the "thttpd_wrapper" which restarts "thttpd" in 10 seconds. I think that covers all of the changes, and the ones that one would have to make if changing OS's. ***************************** Making Ubuntu OS's on the Raspberry Pi. I usually go to RaspberryPi.org and download the latest version of "Ubuntu 64 bit Desktop" to the directory "Ubuntu", so I have the code available and all ready downloaded. I got the "rpi-imager" program using: frank@frank-desktop:~$ frank@frank-desktop:~$ snap install rpi-imager frank@frank-desktop:~$ # or it is in "Ubuntu Software" under "Devices and IoT" as "Raspberry Pi Imager". Anything greater than 32GB needs to be erased so it can have a FAT32 partition on the drive media, using the rpi-imager program. Then installing the OS to the drive. MicroSDHC U1 Cards have a rating of (100 MB/s Read speed, and 10 MB/s Write speed), while microSDXC U3 Cards have a rating of (100MB/s Read speed, and 50MB/s Write speed), 5 times faster on the writes. My 128GB microSDXC U3 Card was rapidly reaching max, and I had several "Seagate, Backup Plus Slim 1TB USB 3.0 drives, (~ 4 3/8" x 3" x 1/2"), of course the erase program failed! But I found an easy solution! The simple solution was using "fdisk" to set the drive up so "rpi-imager" could use it. For formatting drives greater than 512 GB, see: "2021-09-07-Formatting-Drives-Greater-Than-512GB.txt". ***************************** Users and groups that need to be added for "thttpd" to compile. Open a "terminal" full screen, (click on the 9 dots icon in the left "Favorites" column, scroll to the terminal icon, right click and "Add to Favorites" to put it in the left "Favorites" column). frank@frank-desktop:~$ # The "~" shows that we are in the "home directory of frank", from the beginning of the line, (/home/frank/). frank@frank-desktop:~$ cd /etc frank@frank-desktop:/etc$ cat group # (we are looking for a group "www") root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4:syslog,frank tty:x:5: disk:x:6: lp:x:7: mail:x:8: news:x:9: uucp:x:10: man:x:12: proxy:x:13: kmem:x:15: dialout:x:20: fax:x:21: voice:x:22: cdrom:x:24:frank floppy:x:25: tape:x:26: sudo:x:27:frank audio:x:29:pulse dip:x:30:frank www-data:x:33: backup:x:34: operator:x:37: list:x:38: irc:x:39: src:x:40: gnats:x:41: shadow:x:42: utmp:x:43: video:x:44: sasl:x:45: plugdev:x:46:frank staff:x:50: games:x:60: users:x:100: nogroup:x:65534: systemd-journal:x:101: systemd-network:x:102: systemd-resolve:x:103: systemd-timesync:x:104: crontab:x:105: messagebus:x:106: input:x:107: kvm:x:108: render:x:109: syslog:x:110: tss:x:111: bluetooth:x:112: ssl-cert:x:113: uuidd:x:114: tcpdump:x:115: ssh:x:116: avahi-autoipd:x:117: rdma:x:118: rtkit:x:119: netdev:x:120: avahi:x:121: lpadmin:x:122:frank nm-openvpn:x:123: whoopsie:x:124: sssd:x:125: scanner:x:126:saned saned:x:127: colord:x:128: geoclue:x:129: pulse:x:130: pulse-access:x:131: gdm:x:132: lxd:x:133:frank systemd-coredump:x:999: frank:x:1000: sambashare:x:134:frank frank@frank-desktop:/etc$ Since there is no group "www" with the user "(frank)" we will need to add this, getting the directions by using "--help" to see our options. frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ addgroup --help adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] [--encrypt-home] USER Add a normal user adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] USER Add a system user adduser --group [--gid ID] GROUP addgroup [--gid ID] GROUP Add a user group addgroup --system [--gid ID] GROUP Add a system group adduser USER GROUP Add an existing user to an existing group general options: --quiet | -q don't give process information to stdout --force-badname allow usernames which do not match the NAME_REGEX[_SYSTEM] configuration variable --extrausers uses extra users as the database --help | -h usage message --version | -v version number and copyright --conf | -c FILE use FILE as configuration file ***************************** frank@frank-desktop:/etc$ From this we get the commands we need to add a system group "www" and make "(frank)" a member of this group. ********* addgroup --system [--gid ID] GROUP Add a system group ********* adduser USER GROUP Add an existing user to an existing group ********* We need to add a system group "www" and make "(frank)" a member of this group. frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ sudo addgroup --system www [sudo] password for frank: Adding group `www' (GID 135) ... Done. frank@frank-desktop:/etc$ ********* frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ sudo adduser frank www Adding user `frank' to group `www' ... Adding user frank to group www Done. frank@frank-desktop:/etc$ ************** frank@frank-desktop:/etc$ cat group root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4:syslog,frank tty:x:5: disk:x:6: lp:x:7: mail:x:8: news:x:9: uucp:x:10: man:x:12: proxy:x:13: kmem:x:15: dialout:x:20: fax:x:21: voice:x:22: cdrom:x:24:frank floppy:x:25: tape:x:26: sudo:x:27:frank audio:x:29:pulse dip:x:30:frank www-data:x:33: backup:x:34: operator:x:37: list:x:38: irc:x:39: src:x:40: gnats:x:41: shadow:x:42: utmp:x:43: video:x:44: sasl:x:45: plugdev:x:46:frank staff:x:50: games:x:60: users:x:100: nogroup:x:65534: systemd-journal:x:101: systemd-network:x:102: systemd-resolve:x:103: systemd-timesync:x:104: crontab:x:105: messagebus:x:106: input:x:107: kvm:x:108: render:x:109: syslog:x:110: tss:x:111: bluetooth:x:112: ssl-cert:x:113: uuidd:x:114: tcpdump:x:115: ssh:x:116: avahi-autoipd:x:117: rdma:x:118: rtkit:x:119: netdev:x:120: avahi:x:121: lpadmin:x:122:frank nm-openvpn:x:123: whoopsie:x:124: sssd:x:125: scanner:x:126:saned saned:x:127: colord:x:128: geoclue:x:129: pulse:x:130: pulse-access:x:131: gdm:x:132: lxd:x:133:frank systemd-coredump:x:999: frank:x:1000: sambashare:x:134:frank www:x:135:frank frank@frank-desktop:/etc$ Success, Group "www" has a user "(frank)" and is also less than 1000, (the number will probably be different than 135). ***************************** 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, downloads, freedom, memes, music, notices, pictures, rome, searles-sav-on-propane, va, and videos. The files: favicon.ico, readme.txt, and robots.txt 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! rank@frank-desktop:/etc$ frank@frank-desktop:~$ cd ~/freedom/Acme.com/thttpd-2.29 frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ frank@frank-desktop:~/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/(frank)/freedom/Acme.come/thttpd-2.29" This equates to "~/freedom/Acme.com/thttpd-2.29" frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ ls aclocal.m4 config.h configure.in fdwatch.o libhttpd.c match.c mime_types.h README tdate_parse.o timers.c cgi-bin config.log contrib FILES libhttpd.h match.h mime_types.txt scripts thttpd timers.h cgi-src config.status extras index.html libhttpd.o match.o mmc.c strerror.c thttpd.8 timers.o config.cache config.sub fdwatch.c INSTALL Makefile mime_encodings.h mmc.h tdate_parse.c thttpd.c TODO config.guess configure fdwatch.h install-sh Makefile.in mime_encodings.txt mmc.o tdate_parse.h thttpd.o version.h frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ # at which point you should see the above files and one called "INSTALL", which begins with: 1 To build: 2 3 % ./configure 4 5 Edit config.h to change the configuration options if necessary. 6 7 % make 8 9 10 To install: 11 12 % make install 13 14 Edit one of your system rc files to run thttpd at boot time. Do NOT 15 run it from inetd, that setup is inefficient so thttpd doesn't support it. 16 *****Since this program has been run before, the first command needs to be: "make clean", to clear all of the old data.***** ******************* If you have run the program before, or have had errors, at the terminal prompt, type in: "make clean" without the quotes, to clean the old files. (DO IT!). The "%" is the computer prompt: type in: ./configure # and then a return. This should generate a few pages of text. The end should look something like: ***** frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ make clean make: *** No rule to make target 'clean'. Stop. # Or a short list of files and directories that have been removed. ***** frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ ./configure creating 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... 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... yes checking whether gcc accepts -g... yes checking gcc version... 10 # Since the beginning does create errors, but no problem, I included the first few lines. Now skipping to the end: checking if struct tm has tm_gmtoff member... yes checking if int64_t exists... yes checking if socklen_t exists... yes checking whether make sets ${MAKE}... yes checking for a BSD compatible install... /home/bin/install -c updating cache ./config.cache creating ./config.status creating Makefile creating cgi-src/Makefile creating extras/Makefile frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ ******************* The next step: make # will generate more pages and should end with something like this: ***** frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ make 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’: # This was the beginning that runs through many pages, followed by the ending: makeweb.c: In function ‘check_dir’: makeweb.c:97:9: warning: ignoring return value of ‘chown’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 97 | (void) chown( dirname, -1, gid ); | ^~~~~~~~~~~~~~~~~~~~~~~~~ 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 htpasswd.c: In function ‘main’: htpasswd.c:215:5: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 215 | system(command); | ^~~~~~~~~~~~~~~ htpasswd.c: In function ‘add_password’: htpasswd.c:115:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 115 | (void) fgets( pass, sizeof(pass), stdin ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc htpasswd.o -o htpasswd -lcrypt make[1]: Leaving directory '/home/frank/freedom/Acme.com/thttpd-2.29/extras' frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ ******************* # The last step demands being "root" so it is: sudo make install # which should end with something like this: (actually all of it since it is short) ***** frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ sudo make install [sudo] password for frank: mkdir -p /home/local/sbin /usr/bin/install -c -m 555 -o bin -g bin thttpd /home/local/sbin mkdir -p /home/local/man/man1 mkdir -p /home/local/man/man8 /usr/bin/install -c -m 444 -o bin -g bin thttpd.8 /home/local/man/man8 for i in cgi-src extras ; do ( \ cd $i ; \ pwd ; \ make \ WEBDIR=/home/local/www \ CGIBINDIR=/home/local/www/cgi-bin \ MANDIR=/home/local/man \ WEBGROUP=www \ install \ ) ; done /home/frank/freedom/Acme.com/thttpd-2.29/cgi-src make[1]: Entering directory '/home/frank/freedom/Acme.com/thttpd-2.29/cgi-src' mkdir -p /home/local/www/cgi-bin rm -f /home/local/www/cgi-bin/redirect cp redirect /home/local/www/cgi-bin/redirect rm -f /home/local/man/man8/redirect.8 cp redirect.8 /home/local/man/man8/redirect.8 rm -f /home/local/www/cgi-bin/ssi cp ssi /home/local/www/cgi-bin/ssi rm -f /home/local/man/man8/ssi.8 cp ssi.8 /home/local/man/man8/ssi.8 rm -f /home/local/www/cgi-bin/phf cp phf /home/local/www/cgi-bin/phf make[1]: Leaving directory '/home/frank/freedom/Acme.com/thttpd-2.29/cgi-src' /home/frank/freedom/Acme.com/thttpd-2.29/extras make[1]: Entering directory '/home/frank/freedom/Acme.com/thttpd-2.29/extras' rm -f /home/local/sbin/makeweb /home/local/sbin/htpasswd /home/local/sbin/syslogtocern cp makeweb /home/local/sbin/makeweb chgrp www /home/local/sbin/makeweb chmod 2755 /home/local/sbin/makeweb cp htpasswd /home/local/sbin/htpasswd cp syslogtocern /home/local/sbin/syslogtocern rm -f /home/local/man/man1/makeweb.1 cp makeweb.1 /home/local/man/man1/makeweb.1 rm -f /home/local/man/man1/htpasswd.1 cp htpasswd.1 /home/local/man/man1/htpasswd.1 rm -f /home/local/man/man8/syslogtocern.8 cp syslogtocern.8 /home/local/man/man8/syslogtocern.8 make[1]: Leaving directory '/home/frank/freedom/Acme.com/thttpd-2.29/extras' frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ Some errors will be reported since the ARM names are not in its database, 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. ***************************** "thttpd" is now installed. The next thing is to add directories "logs" and "users" to the "www" directory. ***** frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ frank@frank-desktop:~/freedom/Acme.com/thttpd-2.29$ cd /home/local/www frank@frank-desktop:/home/local/www$ frank@frank-desktop:/home/local/www$ ls -al total 12 drwxr-xr-x 3 frank www 4096 Aug 30 12:41 . drwxr-xr-x 7 frank www 4096 Aug 27 16:58 .. drwxr-xr-x 2 root root 4096 Aug 30 11:26 cgi-bin frank@frank-desktop:/home/local/www$ ***** frank@frank-desktop:/home/local/www$ frank@frank-desktop:/home/local/www$ sudo mkdir -v logs users mkdir: created directory 'logs' mkdir: created directory 'users' frank@frank-desktop:/home/local/www$ ls -al total 20 drwxr-xr-x 5 frank www 4096 Aug 30 12:47 . drwxr-xr-x 7 frank www 4096 Aug 27 16:58 .. drwxr-xr-x 2 root root 4096 Aug 30 11:26 cgi-bin drwxr-xr-x 2 root root 4096 Aug 30 12:47 logs drwxr-xr-x 2 root root 4096 Aug 30 12:47 users frank@frank-desktop:/home/local/www$ ******************* Now we go back one level so we can change the owner and group on everything in the "www" directory from "root:root" to "root:www". ***** frank@frank-desktop:/home/local/www$ frank@frank-desktop:/home/local/www$ cd .. frank@frank-desktop:/home/local$ frank@frank-desktop:/home/local$ sudo chown -vR root:www www changed ownership of 'www/users' from root:root to root:www changed ownership of 'www/cgi-bin/ssi' from root:root to root:www changed ownership of 'www/cgi-bin/redirect' 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/logs' from root:root to root:www changed ownership of 'www' from frank:www to root:www frank@frank-desktop:/home/local$ ***** frank@frank-desktop:/home/local$ cd www frank@frank-desktop:/home/local/www$ ls -al total 20 drwxr-xr-x 5 root www 4096 Aug 30 12:47 . drwxr-xr-x 7 frank www 4096 Aug 27 16:58 .. drwxr-xr-x 2 root www 4096 Aug 30 11:26 cgi-bin drwxr-xr-x 2 root www 4096 Aug 30 12:47 logs drwxr-xr-x 2 root www 4096 Aug 30 12:47 users frank@frank-desktop:/home/local/www$ frank@frank-desktop:/home/local/www$ ********* We need this! *****Now we need to change the permissions on "users" so those in the "www" group can write to this directory!***** ***** frank@frank-desktop:/home/local/www$ frank@frank-desktop:/home/local/www$ sudo chmod -v 0775 users mode of 'users' changed from 0755 (rwxr-xr-x) to 0775 (rwxrwxr-x) frank@frank-desktop:/home/local/www$ frank@frank-desktop:/home/local/www$ ls -al total 20 drwxr-xr-x 5 root www 4096 Aug 30 12:47 . drwxr-xr-x 7 frank www 4096 Aug 27 16:58 .. drwxr-xr-x 2 root www 4096 Aug 30 11:26 cgi-bin drwxr-xr-x 2 root www 4096 Aug 30 12:47 logs drwxrwxr-x 2 root www 4096 Aug 30 12:47 users frank@frank-desktop:/home/local/www$ ********* We now change back to the "(frank)" home directory and are going to add a "user" that belongs in the "www" group, from the help on "adduser" we see what we have to type. ***** frank@frank-desktop:/home/local/www$ frank@frank-desktop:/home/local/www$ cd frank@frank-desktop:~$ frank@frank-desktop:~$ addgroup --help adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] [--encrypt-home] USER Add a normal user adduser --system [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--gecos GECOS] [--group | --ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] USER Add a system user adduser --group [--gid ID] GROUP addgroup [--gid ID] GROUP Add a user group addgroup --system [--gid ID] GROUP Add a system group adduser USER GROUP Add an existing user to an existing group general options: --quiet | -q don't give process information to stdout --force-badname allow usernames which do not match the NAME_REGEX[_SYSTEM] configuration variable --extrausers uses extra users as the database --help | -h usage message --version | -v version number and copyright --conf | -c FILE use FILE as configuration file frank@frank-desktop:~$ For an example, I will add "ac0xl", my ham radio call sign, as a user for my website. 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 "(frank)" for more security. The information it asks for was for the "finger" program which most computers don't run for security reasons. I usually just use the "user" for the name and leave the rest blank. (This time I will use my real data.) ***** frank@frank-desktop:~$ frank@frank-desktop:~$ sudo adduser --add_extra_groups ac0xl Adding user `ac0xl' ... Adding new group `ac0xl' (1001) ... Adding new user `ac0xl' (1001) with group `ac0xl' ... Creating home directory `/home/ac0xl' ... Copying files from `/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for ac0xl Enter the new value, or press ENTER for the default Full Name []: Frank Anderson Room Number []: 651 N Broadway Work Phone []: 435-210-0710 Home Phone []: 970-424-1451 Other []: Green River UT 84525-0615 Is the information correct? [Y/n] y Adding new user `ac0xl' to extra groups ... Adding user `ac0xl' to group `dialout' ... Adding user `ac0xl' to group `cdrom' ... Adding user `ac0xl' to group `floppy' ... Adding user `ac0xl' to group `audio' ... Adding user `ac0xl' to group `video' ... Adding user `ac0xl' to group `plugdev' ... Adding user `ac0xl' to group `users' ... frank@frank-desktop:~$ ***** frank@frank-desktop:~$ frank@frank-desktop:~$ cat /etc/group root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4:syslog,frank tty:x:5: disk:x:6: lp:x:7: mail:x:8: news:x:9: uucp:x:10: man:x:12: proxy:x:13: kmem:x:15: dialout:x:20:ac0xl fax:x:21: voice:x:22: cdrom:x:24:frank,ac0xl floppy:x:25:ac0xl tape:x:26: sudo:x:27:frank audio:x:29:pulse,ac0xl dip:x:30:frank www-data:x:33: backup:x:34: operator:x:37: list:x:38: irc:x:39: src:x:40: gnats:x:41: shadow:x:42: utmp:x:43: video:x:44:ac0xl sasl:x:45: plugdev:x:46:frank,ac0xl staff:x:50: games:x:60: users:x:100:ac0xl nogroup:x:65534: systemd-journal:x:101: systemd-network:x:102: systemd-resolve:x:103: systemd-timesync:x:104: crontab:x:105: messagebus:x:106: input:x:107: kvm:x:108: render:x:109: syslog:x:110: tss:x:111: bluetooth:x:112: ssl-cert:x:113: uuidd:x:114: tcpdump:x:115: ssh:x:116: avahi-autoipd:x:117: rdma:x:118: rtkit:x:119: netdev:x:120: avahi:x:121: lpadmin:x:122:frank nm-openvpn:x:123: whoopsie:x:124: sssd:x:125: scanner:x:126:saned saned:x:127: colord:x:128: geoclue:x:129: pulse:x:130: pulse-access:x:131: gdm:x:132: lxd:x:133:frank systemd-coredump:x:999: frank:x:1000: sambashare:x:134:frank www:x:135:frank ac0xl:x:1001: frank@frank-desktop:~$ frank@frank-desktop:~$ adduser USER GROUP Add an existing user to an existing group ***** frank@frank-desktop:~$ frank@frank-desktop:~$ sudo adduser ac0xl www Adding user `ac0xl' to group `www' ... Adding user ac0xl to group www Done. frank@frank-desktop:~$ ***** frank@frank-desktop:~$ frank@frank-desktop:~$ cat /etc/group root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4:syslog,frank tty:x:5: disk:x:6: lp:x:7: mail:x:8: news:x:9: uucp:x:10: man:x:12: proxy:x:13: kmem:x:15: dialout:x:20:ac0xl fax:x:21: voice:x:22: cdrom:x:24:frank,ac0xl floppy:x:25:ac0xl tape:x:26: sudo:x:27:frank audio:x:29:pulse,ac0xl dip:x:30:frank www-data:x:33: backup:x:34: operator:x:37: list:x:38: irc:x:39: src:x:40: gnats:x:41: shadow:x:42: utmp:x:43: video:x:44:ac0xl sasl:x:45: plugdev:x:46:frank,ac0xl staff:x:50: games:x:60: users:x:100:ac0xl nogroup:x:65534: systemd-journal:x:101: systemd-network:x:102: systemd-resolve:x:103: systemd-timesync:x:104: crontab:x:105: messagebus:x:106: input:x:107: kvm:x:108: render:x:109: syslog:x:110: tss:x:111: bluetooth:x:112: ssl-cert:x:113: uuidd:x:114: tcpdump:x:115: ssh:x:116: avahi-autoipd:x:117: rdma:x:118: rtkit:x:119: netdev:x:120: avahi:x:121: lpadmin:x:122:frank nm-openvpn:x:123: whoopsie:x:124: sssd:x:125: scanner:x:126:saned saned:x:127: colord:x:128: geoclue:x:129: pulse:x:130: pulse-access:x:131: gdm:x:132: lxd:x:133:frank systemd-coredump:x:999: frank:x:1000: sambashare:x:134:frank www:x:135:frank,ac0xl ac0xl:x:1001: frank@frank-desktop:~$ frank@frank-desktop:~$ ************** ***** frank@frank-desktop:~$ frank@frank-desktop:~$ cd /home frank@frank-desktop:/home$ ls -al total 16 drwxr-xr-x 4 root root 4096 May 27 16:02 . drwxr-xr-x 20 root root 4096 Apr 21 18:13 .. drwxr-x--- 2 ac0xl ac0xl 4096 May 27 16:02 ac0xl drwxr-x--- 21 frank frank 4096 May 27 13:04 frank frank@frank-desktop:/home$ ***** frank@frank-desktop:/home$ frank@frank-desktop:/home$ su ac0xl # we have to change to user "(ac0xl)" Password: ac0xl@frank-desktop:/home$ cd # here we are still in "/home" ac0xl@frank-desktop:~$ ls -al # we are now in "(ac0xl)" total 20 drwxr-x--- 2 ac0xl ac0xl 4096 May 27 16:02 . drwxr-xr-x 4 root root 4096 May 27 16:02 .. -rw-r--r-- 1 ac0xl ac0xl 220 May 27 16:02 .bash_logout -rw-r--r-- 1 ac0xl ac0xl 3771 May 27 16:02 .bashrc -rw-r--r-- 1 ac0xl ac0xl 807 May 27 16:02 .profile ac0xl@frank-desktop:~$ # if makeweb does not work (no permission) did you?: sudo chmod -v 0775 /home/local/www/users #? ***** ac0xl@frank-desktop:~$ ac0xl@frank-desktop:~$ makeweb Created web directory /home/local/www/users/ac0xl Created symbolic link /home/ac0xl/public_html ac0xl@frank-desktop:~$ ac0xl@frank-desktop:~$ ls -al total 20 drwxr-x--- 2 ac0xl ac0xl 4096 May 27 16:18 . drwxr-xr-x 4 root root 4096 May 27 16:02 .. -rw-r--r-- 1 ac0xl ac0xl 220 May 27 16:02 .bash_logout -rw-r--r-- 1 ac0xl ac0xl 3771 May 27 16:02 .bashrc -rw-r--r-- 1 ac0xl ac0xl 807 May 27 16:02 .profile lrwxrwxrwx 1 ac0xl www 26 May 27 16:18 public_html -> /home/local/www/users/ac0xl ac0xl@frank-desktop:~$ ac0xl@frank-desktop:~$ ***** ac0xl@frank-desktop:~$ exit # changing back to (frank) exit frank@frank-desktop:/home$ frank@frank-desktop:/home$ cd /home/local/www/users frank@frank-desktop:/home/local/www/users$ frank@frank-desktop:/home/local/www/users$ ls -al total 12 drwxrwxr-x 3 root www 4096 Aug 30 13:21 . drwxr-xr-x 5 root www 4096 Aug 30 12:47 .. drwxr-xr-x 2 ac0xl ac0xl 4096 Aug 30 13:21 ac0xl frank@frank-desktop:/home/local/www/users$ Since I want to be able to access "ac0xl" from "frank" I will change the group on "ac0xl" to "www". ***** frank@frank-desktop:/home/local/www/users$ frank@frank-desktop:/home/local/www/users$ sudo chown -v ac0xl:www ac0xl [sudo] password for frank: changed ownership of 'ac0xl' from ac0xl:ac0xl to ac0xl:www frank@frank-desktop:/home/local/www/users$ ***** frank@frank-desktop:/home/local/www/users$ sudo chown -v ac0xl:www /home/ac0xl changed ownership of '/home/ac0xl' from ac0xl:ac0xl to ac0xl:www frank@frank-desktop:/home/local/www/users$ frank@frank-desktop:/home/local/www/users$ frank@frank-desktop:/home/local/www/users$ ls -al total 12 drwxrwxr-x 3 root www 4096 Aug 30 13:21 . drwxr-xr-x 5 root www 4096 Aug 30 12:47 .. drwxr-xr-x 2 ac0xl www 4096 Aug 30 13:21 ac0xl frank@frank-desktop:/home/local/www/users$ So far so good! We now have a main www user installed. ***************************** I liked the "anvil_thttpd.gif" on the Acme.com website and chose it as my favicon.ico by renaming a copy to favicon.ico. An "anvil" is built to be hammered on without failing, and "thttpd" is built to take a hammering without failing. It is bullet proof! When you look at your logs you will see how "thttpd" will block all sorts of attempts to break your website! You will also get an idea of things to avoid on your website. ***** frank@frank-desktop:/home/local/www/users$ frank@frank-desktop:/home/local/www/users$ cd /home/local/sbin frank@frank-desktop:/home/local/sbin$ frank@frank-desktop:/home/local/sbin$ ls -al total 172 drwxr-xr-x 2 root root 4096 Aug 30 11:26 . drwxr-xr-x 7 frank www 4096 Aug 27 16:58 .. -rwxr-xr-x 1 root root 19048 Aug 30 11:26 htpasswd -rwxr-sr-x 1 root www 14184 Aug 30 11:26 makeweb -r-xr-xr-x 1 root root 2878 Aug 30 11:26 syslogtocern -r-xr-xr-x 1 bin bin 124560 Aug 30 11:26 thttpd frank@frank-desktop:/home/local/sbin$ ***** frank@frank-desktop:/home/local/sbin$ cd ~/freedom # (The directory "freedom" should be in "/home/(frank)/"). frank@frank-desktop:~/freedom$ frank@frank-desktop:~/freedom$ ls -al total 680 drwxr-xr-x 5 frank frank 4096 Aug 31 15:37 . drwxr-x--- 45 frank frank 4096 Aug 31 12:37 .. -rw-r--r-- 1 frank frank 32014 Jan 8 2020 2010Website.pdf -rw-r--r-- 1 frank frank 11024 Jan 8 2020 2019-09-05-Project.txt -rw-r--r-- 1 frank frank 11941 Jan 8 2020 2019-10-01-website.txt -rw-r--r-- 1 frank frank 6365 Jan 8 2020 2019-11-26-web-server.txt -rw-r--r-- 1 frank frank 21340 Jan 8 2020 2019-12-06-Google-Search-Is-Broken.txt -rw-r--r-- 1 frank frank 77404 Oct 16 2020 2019-12-26-Installing-thttpd.txt -rw-r--r-- 1 frank frank 12787 Mar 18 19:17 2020-07-17-thttpd.txt -rw-rw-r-- 1 frank frank 117624 Aug 30 16:01 2021-06-15-Install-thttpd-Pi-400-ubuntu-21.04-desktop-arm64+raspi.txt -rw-rw-r-- 1 frank frank 120109 Aug 31 15:24 2021-07-12-Install-thttpd-Pi-400-ubuntu-21.04-desktop-arm64+raspi.txt -rw-rw-r-- 1 frank frank 120106 Jul 12 15:44 2021-07-12-Install-thttpd-Pi-400-ubuntu-21.04-desktop-arm64+raspi.txt~ -rw-rw-r-- 1 frank frank 58097 Aug 31 15:37 2021-08-30-install.txt drwxr-xr-x 22 frank frank 4096 Aug 30 13:52 Acme.com -rw-r--r-- 1 frank frank 140 Aug 23 21:31 environment -rw-r--r-- 1 frank frank 107 Aug 23 21:32 environment~ drwxr-xr-x 2 frank frank 4096 Aug 31 14:53 os-debug -rw-r--r-- 1 frank frank 37280 Jul 12 16:24 readme.txt -rw-r--r-- 1 frank frank 186 Jan 8 2020 sitemap.xml -rw-r--r-- 1 frank frank 186 Jan 8 2020 sitemap.xml.txt -rwxr-xr-- 1 frank frank 472 Aug 31 14:35 thttpd_config -rwxr-xr-- 1 frank frank 472 Aug 31 14:35 thttpd_config~ drwxr-xr-x 2 frank frank 4096 Aug 31 14:40 thttpd-extras frank@frank-desktop:~/freedom$ ***** frank@frank-desktop:~/freedom$ sudo cp -rv thttpd-extras /home/local/sbin/ [sudo] password for frank: 'thttpd-extras' -> '/home/local/sbin/thttpd-extras' 'thttpd-extras/rc.local~' -> '/home/local/sbin/thttpd-extras/rc.local~' 'thttpd-extras/thttpd_config~' -> '/home/local/sbin/thttpd-extras/thttpd_config~' 'thttpd-extras/thttpd.sh' -> '/home/local/sbin/thttpd-extras/thttpd.sh' 'thttpd-extras/anvil_thttpd.gif' -> '/home/local/sbin/thttpd-extras/anvil_thttpd.gif' 'thttpd-extras/readme.txt' -> '/home/local/sbin/thttpd-extras/readme.txt' 'thttpd-extras/sitemap.xml' -> '/home/local/sbin/thttpd-extras/sitemap.xml' 'thttpd-extras/sitemap.xml.txt' -> '/home/local/sbin/thttpd-extras/sitemap.xml.txt' 'thttpd-extras/favicon.ico' -> '/home/local/sbin/thttpd-extras/favicon.ico' 'thttpd-extras/robots-site.txt' -> '/home/local/sbin/thttpd-extras/robots-site.txt' 'thttpd-extras/robots.txt' -> '/home/local/sbin/thttpd-extras/robots.txt' 'thttpd-extras/thttpd_config' -> '/home/local/sbin/thttpd-extras/thttpd_config' 'thttpd-extras/rc.local' -> '/home/local/sbin/thttpd-extras/rc.local' 'thttpd-extras/thttpd-rotate' -> '/home/local/sbin/thttpd-extras/thttpd-rotate' 'thttpd-extras/thttpd_wrapper' -> '/home/local/sbin/thttpd-extras/thttpd_wrapper' 'thttpd-extras/thttpd-rotate~' -> '/home/local/sbin/thttpd-extras/thttpd-rotate~' 'thttpd-extras/thttpd.sh~' -> '/home/local/sbin/thttpd-extras/thttpd.sh~' 'thttpd-extras/thttpd_wrapper~' -> '/home/local/sbin/thttpd-extras/thttpd_wrapper~' frank@frank-desktop:~/freedom$ ***** frank@frank-desktop:~/freedom$ frank@frank-desktop:~/freedom$ sudo cp -rv os-debug /home/local/sbin/ 'os-debug' -> '/home/local/sbin/os-debug' 'os-debug/thttpd_wrapper' -> '/home/local/sbin/os-debug/thttpd_wrapper' 'os-debug/thttpd-rotate' -> '/home/local/sbin/os-debug/thttpd-rotate' 'os-debug/dead-thttpd' -> '/home/local/sbin/os-debug/dead-thttpd' 'os-debug/datelog' -> '/home/local/sbin/os-debug/datelog' 'os-debug/readme.txt' -> '/home/local/sbin/os-debug/readme.txt' 'os-debug/readme.txt~' -> '/home/local/sbin/os-debug/readme.txt~' 'os-debug/datelog~' -> '/home/local/sbin/os-debug/datelog~' 'os-debug/dead-thttpd~' -> '/home/local/sbin/os-debug/dead-thttpd~' 'os-debug/thttpd-rotate~' -> '/home/local/sbin/os-debug/thttpd-rotate~' 'os-debug/thttpd_wrapper~' -> '/home/local/sbin/os-debug/thttpd_wrapper~' frank@frank-desktop:~/freedom$ ***** frank@frank-desktop:~/freedom$ cd /home/local/sbin/thttpd-extras frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ls -al total 76 drwxr-xr-x 2 root root 4096 Aug 31 15:10 . drwxr-xr-x 4 root root 4096 Aug 31 14:26 .. -rw-r--r-- 1 root root 533 Aug 31 15:53 anvil_thttpd.gif -rw-r--r-- 1 root root 533 Aug 31 15:53 favicon.ico -rwxr-xr-- 1 root root 485 Aug 31 15:53 rc.local -rwxr-xr-- 1 root root 485 Aug 31 15:53 rc.local~ -rw-r--r-- 1 root root 308 Aug 31 15:53 readme.txt -rw-r--r-- 1 root root 73 Aug 31 15:53 robots-site.txt -rw-r--r-- 1 root root 27 Aug 31 15:53 robots.txt -rw-r--r-- 1 root root 186 Aug 31 15:53 sitemap.xml -rw-r--r-- 1 root root 186 Aug 31 15:53 sitemap.xml.txt -rwxr-xr-- 1 root root 472 Aug 31 15:53 thttpd_config -rw-r--r-- 1 root root 472 Aug 31 15:53 thttpd_config~ -rwxr-xr-- 1 root root 1746 Aug 31 15:53 thttpd-rotate -rwxr-xr-- 1 root root 1746 Aug 31 15:53 thttpd-rotate~ -rw-r--r-- 1 root root 138 Aug 31 15:53 thttpd.sh -rw-r--r-- 1 root root 138 Aug 31 15:53 thttpd.sh~ -rwxr-xr-- 1 root root 122 Aug 31 15:53 thttpd_wrapper -rwxr-xr-- 1 root root 122 Aug 31 15:53 thttpd_wrapper~ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat /etc/rc.local cat: /etc/rc.local: No such file or directory *****rc.local is a file that is part of "systemd" which is in "/etc".***** ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat rc.local #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi # Start thttpd echo "Starting thttpd. \n" . /etc/thttpd.sh # exit 0 frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo cp -iav rc.local /etc/rc.local 'rc.local' -> '/etc/rc.local' frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ ls -l /etc/rc.local -rwxr-xr-- 1 root root 485 Aug 31 15:53 /etc/rc.local # (rc.local is still 0754) frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ We now need to copy thttpd.sh to /etc and make sure it is 0754. ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo cp -iav thttpd.sh /etc/ 'thttpd.sh' -> '/etc/thttpd.sh' frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ ls -l /etc/thttpd.sh -rwxr-xr-- 1 root root 138 Aug 31 15:53 /etc/thttpd.sh # (thttpd.sh is still 0754) frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat thttpd.sh #!/bin/sh # thttpd.sh if [ -x /home/local/sbin/thttpd_wrapper ] ; then echo -n " thttpd" /home/local/sbin/thttpd_wrapper & fi # exit 0 frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ # thttpd.sh is looking for thttpd_wrapper to be in "/home/local/sbin/" and being 0754, so we will copy "thttpd_wrapper" up one level to there. frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo cp -iav thttpd_wrapper ../ 'thttpd_wrapper' -> '../thttpd_wrapper' frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ls -l /home/local/sbin total 176 -rwxr-xr-x 1 root root 19048 Aug 30 11:26 htpasswd -rwxr-sr-x 1 root www 14184 Aug 30 11:26 makeweb drwxr-xr-x 2 root root 4096 Aug 31 15:04 os-debug -r-xr-xr-x 1 root root 2878 Aug 30 11:26 syslogtocern -r-xr-xr-x 1 bin bin 124560 Aug 30 11:26 thttpd drwxr-xr-x 2 root root 4096 Aug 31 15:10 thttpd-extras -rwxr-xr-- 1 root root 122 Aug 31 15:53 thttpd_wrapper frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ The purpose of the file "thttpd_wrapper" is to restart "thttpd" if it stops, and it checks every 10 seconds to see if "/home/local/sbin/thttpd" is running and it also loads the configuration file that is: "/home/local/www/thttpd_config". If one changes the config file, one only has to kill the "thttpd pid number" and the wrapper will restart it in 10 seconds with the new configuration. "sudo kill xxxx" will kill a program. To get all of the running "pid" numbers use "ps -e". If you forget to use "sudo" to manually start "thttpd" or even "rc.local" every 10 seconds you will get a message that "/home/local/www/logs/thttpd_log" can not be written to! (because it is now owned by nobody). What appears on your screen is not what you type in, but both the error message and what you type in. Type in "ps -e" and look for the number for "thttpd_wrapper" and then type in "sudo kill xxxx" with "xxxx" being the "pid" number. Been there, done that way too many times! ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat thttpd_wrapper #!/bin/sh # thttpd_wrapper while true ; do /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config sleep 10 done # frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ Next "thttpd-rotate" needs to be moved to "/etc/cron.daily/" so our log files get moved every day. The time they get rotated is in "/etc/crontab" ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat /etc/crontab # /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 # You can also override PATH, by default, newer versions inherit it from the environment #PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * user-name command to be executed 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo cp -iav thttpd-rotate /etc/cron.daily/ 'thttpd-rotate' -> '/etc/cron.daily/thttpd-rotate' frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ls -al /etc/cron.daily total 52 drwxr-xr-x 2 root root 4096 Aug 16 00:44 . drwxr-xr-x 140 root root 8192 Aug 31 09:58 .. -rwxr-xr-x 1 root root 311 Mar 15 09:58 0anacron -rwxr-xr-x 1 root root 376 Mar 24 08:58 apport -rwxr-xr-x 1 root root 1478 Apr 13 09:53 apt-compat -rwxr-xr-x 1 root root 384 Nov 19 2019 cracklib-runtime -rwxr-xr-x 1 root root 1298 Jan 29 2021 dpkg -rwxr-xr-x 1 root root 377 Feb 9 2021 logrotate -rwxr-xr-x 1 root root 1123 Feb 19 2021 man-db -rw-r--r-- 1 root root 102 Mar 15 08:10 .placeholder -rwxr-xr-x 1 root root 383 Nov 19 2020 samba -rwxr-xr-- 1 root root 1746 Aug 31 15:53 thttpd-rotate frank@frank-desktop:/home/local/sbin/thttpd-extras$ # (thttpd_rotate is still 0754) frank@frank-desktop:/home/local/sbin/thttpd-extras$ The "thttpd_rotate" file I made is for 50 days so you don't have to move them every day, week, or even month. I also put a header and a tail on the files when they rotate so you have an idea how long your website has been up. ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat thttpd-rotate #!/bin/sh # /etc/cron.daily/thttpd-rotate cd /home/local/www/logs rm -f thttpd_log.50 mv thttpd_log.49 thttpd_log.50 mv thttpd_log.48 thttpd_log.49 mv thttpd_log.47 thttpd_log.48 mv thttpd_log.46 thttpd_log.47 mv thttpd_log.45 thttpd_log.46 mv thttpd_log.44 thttpd_log.45 mv thttpd_log.43 thttpd_log.44 mv thttpd_log.42 thttpd_log.43 mv thttpd_log.41 thttpd_log.42 mv thttpd_log.40 thttpd_log.41 mv thttpd_log.39 thttpd_log.40 mv thttpd_log.38 thttpd_log.39 mv thttpd_log.37 thttpd_log.38 mv thttpd_log.36 thttpd_log.37 mv thttpd_log.35 thttpd_log.36 mv thttpd_log.34 thttpd_log.35 mv thttpd_log.33 thttpd_log.34 mv thttpd_log.32 thttpd_log.33 mv thttpd_log.31 thttpd_log.32 mv thttpd_log.30 thttpd_log.31 mv thttpd_log.29 thttpd_log.30 mv thttpd_log.28 thttpd_log.29 mv thttpd_log.27 thttpd_log.28 mv thttpd_log.26 thttpd_log.27 mv thttpd_log.25 thttpd_log.26 mv thttpd_log.24 thttpd_log.25 mv thttpd_log.23 thttpd_log.24 mv thttpd_log.22 thttpd_log.23 mv thttpd_log.21 thttpd_log.22 mv thttpd_log.20 thttpd_log.21 mv thttpd_log.19 thttpd_log.20 mv thttpd_log.18 thttpd_log.19 mv thttpd_log.17 thttpd_log.18 mv thttpd_log.16 thttpd_log.17 mv thttpd_log.15 thttpd_log.16 mv thttpd_log.14 thttpd_log.15 mv thttpd_log.13 thttpd_log.14 mv thttpd_log.12 thttpd_log.13 mv thttpd_log.11 thttpd_log.12 mv thttpd_log.10 thttpd_log.11 mv thttpd_log.09 thttpd_log.10 mv thttpd_log.08 thttpd_log.09 mv thttpd_log.07 thttpd_log.08 mv thttpd_log.06 thttpd_log.07 mv thttpd_log.05 thttpd_log.06 mv thttpd_log.04 thttpd_log.05 mv thttpd_log.03 thttpd_log.04 mv thttpd_log.02 thttpd_log.03 mv thttpd_log.01 thttpd_log.02 date >> thttpd_log w >> thttpd_log mv thttpd_log thttpd_log.01 date > thttpd_log w >> thttpd_log kill -usr1 `cat /var/run/thttpd.pid` # frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ********* To copy the log files to dates, I "cd /home/local/www/logs/" and then type ls -al to get a listing of the files and the dates for the files. Then to copy the files: "sudo cp -iv *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 -iv" 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 ac0xl:www year.mo.da # the owner:group changes from root:root to ac0xl:www ls -al #(lists the files and shows that they are "ac0xl www") su ac0xl #(Shell to user "ac0xl" at this point you are still at: "/home/local/www/logs/") cp -iv year.mo.da ~/logs/ # which will copy the files into the /ac0xl/logs/ file cp -iv year.mo.da ~/public_html/logs/ # which will copy the files into the /home/local/www/users/ac0xl/logs/ file, making them live on the www. They will be under "ac0xl/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 (frank). I posted the logs to my site just so one could see what to expect from activity on the Internet and how "thttpd" handles those interactions. The last files to copy will be the "thttpd_config" files which go to "/home/local/www/". ********* ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo cp -iav thttpd_config* /home/local/www/ [sudo] password for frank: 'thttpd_config' -> '/home/local/www/thttpd_config' 'thttpd_config~' -> '/home/local/www/thttpd_config~' frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ls -al /home/local/www/ total 28 drwxr-xr-x 5 root www 4096 Aug 31 17:07 . drwxr-xr-x 7 frank www 4096 Aug 27 16:58 .. drwxr-xr-x 2 root www 4096 Aug 30 11:26 cgi-bin drwxr-xr-x 2 root www 4096 Aug 30 12:47 logs -rwxr-xr-- 1 root root 472 Aug 31 15:53 thttpd_config -rw-r--r-- 1 root root 472 Aug 31 15:53 thttpd_config~ drwxrwxr-x 3 root www 4096 Aug 30 13:21 users frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat thttpd_config # /home/local/www/thttpd_config dir=/home/local/www chroot #chroot jail data_dir=users #vhost # if you use a domain name you will have to uncomment (remove the # at the beginning) and then make a "user" directory using your external IPv4 address (xxx.xxx.xxx.xxx) and inside this directory make symbolic links back up to your other files in "users" (../"user-name"). cgipat=**.cgi logfile=/home/local/www/logs/thttpd_log pidfile=/var/run/thttpd.pid # frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***************************** ***************************** TESTING: We need the line from thttpd_wrapper without the wrapper. ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ cd .. frank@frank-desktop:/home/local/sbin$ frank@frank-desktop:/home/local/sbin$ cat thttpd_wrapper #!/bin/sh # thttpd_wrapper while true ; do /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config sleep 10 done # frank@frank-desktop:/home/local/sbin$ ***** frank@frank-desktop:/home/local/sbin$ cd frank@frank-desktop:~$ frank@frank-desktop:~$ # 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. ***** frank@frank-desktop:~$ # sudo /home/local/sbin/thttpd -D -C /home/local/www/thttpd_config *****On a new terminal***** Next type: ps -e # in another terminal window 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. At this point the terminal is still in use by thttpd. Opening a new terminal we see the pid number is: 6676 for sudo, and 6677 for thttpd. ***** frank@frank-desktop:~$ ps -e PID TTY TIME CMD 1 ? 00:00:08 systemd 2 ? 00:00:00 kthreadd 3 ? 00:00:00 rcu_gp 4 ? 00:00:00 rcu_par_gp ... 6659 pts/2 00:00:00 bash 6674 ? 00:00:00 kworker/0:0-events 6675 ? 00:00:00 kworker/1:0-events 6676 pts/2 00:00:00 sudo 6677 ? 00:00:00 thttpd 6688 pts/3 00:00:00 bash 6698 pts/3 00:00:00 ps frank@frank-desktop:~$ ***** Firefox Web Browser: localhost #***** One time I didn't get a green screen, and finally saw: "HTTPS://localhost" HTTPS is Port:443 so dump the "s" for "HTTP, Port:80.***** Index of / mode links bytes last-changed name dr-x 3 4096 Aug 30 19:21 ./ dr-x 5 4096 Aug 31 23:07 ../ dr-x 2 4096 Aug 30 19:21 ac0xl/ ***** thttpd is RUNNING! sudo kill 6676 6677 This freed up the terminal that was running thttpd. 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 6676 for sudo, and 6677 for thttpd. ***************************** In a new terminal, type: "cd /home/local/www/logs" ***** frank@frank-desktop:~$ frank@frank-desktop:~$ cd /home/local/www/logs frank@frank-desktop:/home/local/www/logs$ frank@frank-desktop:/home/local/www/logs$ ls -al total 12 drwxr-xr-x 2 root www 4096 Aug 31 17:34 . drwxr-xr-x 5 root www 4096 Aug 31 17:07 .. -rw-r--r-- 1 nobody nogroup 728 Aug 31 17:39 thttpd_log frank@frank-desktop:/home/local/www/logs$ ***** frank@frank-desktop:/home/local/www/logs$ cat *log 127.0.0.1 - - [31/Aug/2021:23:38:28 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:29 +0000] "GET /favicon.ico HTTP/1.1" 404 0 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:33 +0000] "GET /ac0xl/ HTTP/1.1" 200 25000 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:40 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" 127.0.0.1 - - [31/Aug/2021:23:38:46 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" 127.0.0.1 - - [31/Aug/2021:23:39:00 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" frank@frank-desktop:/home/local/www/logs$ frank@frank-desktop:/home/local/www/logs$ The program thttpd is working OK. Now we need to add the files to "users" that are in "/home/local/sbin/thttpd-extras". ***** frank@frank-desktop:/home/local/www/logs$ frank@frank-desktop:/home/local/www/logs$ cd /home/local/sbin/thttpd-extras/ frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ls -al total 76 drwxr-xr-x 2 root root 4096 Aug 31 15:10 . drwxr-xr-x 4 root root 4096 Aug 31 16:33 .. -rw-r--r-- 1 root root 533 Aug 31 15:53 anvil_thttpd.gif -rw-r--r-- 1 root root 533 Aug 31 15:53 favicon.ico -rwxr-xr-- 1 root root 485 Aug 31 15:53 rc.local -rwxr-xr-- 1 root root 485 Aug 31 15:53 rc.local~ -rw-r--r-- 1 root root 308 Aug 31 15:53 readme.txt -rw-r--r-- 1 root root 73 Aug 31 15:53 robots-site.txt -rw-r--r-- 1 root root 27 Aug 31 15:53 robots.txt -rw-r--r-- 1 root root 186 Aug 31 15:53 sitemap.xml -rw-r--r-- 1 root root 186 Aug 31 15:53 sitemap.xml.txt -rwxr-xr-- 1 root root 472 Aug 31 15:53 thttpd_config -rw-r--r-- 1 root root 472 Aug 31 15:53 thttpd_config~ -rwxr-xr-- 1 root root 1746 Aug 31 15:53 thttpd-rotate -rwxr-xr-- 1 root root 1746 Aug 31 15:53 thttpd-rotate~ -rwxr-xr-- 1 root root 138 Aug 31 15:53 thttpd.sh -rw-r--r-- 1 root root 138 Aug 31 15:53 thttpd.sh~ -rwxr-xr-- 1 root root 122 Aug 31 15:53 thttpd_wrapper -rwxr-xr-- 1 root root 122 Aug 31 15:53 thttpd_wrapper~ frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ # (Since these files are owned by root you will need to use sudo to copy them.) ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo cp -iav favicon.ico /home/local/www/users/ [sudo] password for frank: 'favicon.ico' -> '/home/local/www/users/favicon.ico' frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo cp -iav readme.txt /home/local/www/users/ 'readme.txt' -> '/home/local/www/users/readme.txt' frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo cp -iav robots.txt /home/local/www/users/ 'robots.txt' -> '/home/local/www/users/robots.txt' frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ sudo ls -al /home/local/www/users/ total 24 drwxrwxr-x 3 root www 4096 Aug 31 19:35 . drwxr-xr-x 5 root www 4096 Aug 31 17:07 .. drwxr-xr-x 2 ac0xl www 4096 Aug 30 13:21 ac0xl -rw-r--r-- 1 root root 533 Aug 31 15:53 favicon.ico -rw-r--r-- 1 root root 308 Aug 31 15:53 readme.txt -rw-r--r-- 1 root root 27 Aug 31 15:53 robots.txt frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ********* ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat robots-site.txt User-agent: * Disallow: Sitemap: http://xxx.xxx.xxx.xxx/sitemap.xml/ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ cat sitemap.xml http://xxx.xxx.xxx.xxx/ frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ ********* You would use "robots-site.txt" replacing the XXX.xxx.xxx.xxx with your external static IPv4 address and then naming it "robots.txt". Likewise, with the "sitemap.xml" file and keep the same name for it. Adding both of these files to “/home/local/www/users/”, if you have an external static IP address. ******************* ***** frank@frank-desktop:/home/local/sbin/thttpd-extras$ frank@frank-desktop:/home/local/sbin/thttpd-extras$ cd /etc frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ # ****If you don't use sudo here it will start looping every 10 seconds. Then you would have to find the pid number for thttpd_wrapper and sudo kill "pid-number" because it is trying to write to root files!!!, or just turn off the computer.**** ***** frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ sudo ./rc.local # (Starting thttpd from rc.local, REMEMBER the sudo!!!!!!) [sudo] password for frank: My IP address is 192.168.19.13 Starting thttpd. thttpdfrank@frank-desktop:/etc$ frank@frank-desktop:/etc$ # on the line above, (Notice the thttpd in front of frank@frank-desktop:/etc$ on the terminal screen, it is still running.) frank@frank-desktop:/etc$ ***** Typing “192.168.19.13” on the browser, we get: Index of / mode links bytes last-changed name dr-x 3 4096 Sep 1 01:35 ./ dr-x 5 4096 Aug 31 23:07 ../ dr-x 2 4096 Aug 30 19:21 ac0xl/ -r-- 1 533 Aug 31 21:53 favicon.ico -r-- 1 308 Aug 31 21:53 readme.txt -r-- 1 27 Aug 31 21:53 robots.txt ***** frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ cat /home/local/www/logs/*log 127.0.0.1 - - [31/Aug/2021:23:38:28 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:29 +0000] "GET /favicon.ico HTTP/1.1" 404 0 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:33 +0000] "GET /ac0xl/ HTTP/1.1" 200 25000 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:40 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" 127.0.0.1 - - [31/Aug/2021:23:38:46 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" 127.0.0.1 - - [31/Aug/2021:23:39:00 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" 192.168.19.13 - - [01/Sep/2021:02:06:36 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:06:36 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:08:15 +0000] "GET /ac0xl/ HTTP/1.1" 200 25000 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:08:32 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:08:32 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.19.13/readme.txt" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:08:40 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ By clicking on each entry everything works! and now shows up in the log file. *****At this point I realized I forgot to type in the first "sudo kill 6676 6677" command for "sudo" and "thttpd" so the next run added "7786 - thttpd_wrapper" and "8151 - sleep", so this time I will "kill" all four.***** ***** frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ ps -e PID TTY TIME CMD 1 ? 00:00:09 systemd 2 ? 00:00:00 kthreadd 3 ? 00:00:00 rcu_gp 4 ? 00:00:00 rcu_par_gp 8 ? 00:00:00 mm_percpu_wq ... 5837 ? 00:01:01 nautilus 6659 pts/2 00:00:00 bash 6676 pts/2 00:00:00 sudo 6677 ? 00:01:54 thttpd 6688 pts/3 00:00:00 bash 6714 ? 02:16:02 firefox 6786 ? 01:32:45 Web Content ... 7687 ? 00:00:01 kworker/0:1-events 7780 ? 00:00:00 kworker/3:0-events 7786 pts/0 00:00:00 thttpd_wrapper 7800 ? 00:00:00 kworker/2:0-events 7821 ? 00:00:00 kworker/0:0-events 7881 ? 00:00:00 kworker/1:0-events 7893 ? 00:00:00 kworker/2:1-events 7926 ? 00:00:00 kworker/0:1H 7948 ? 00:00:00 kworker/2:2H 7950 ? 00:00:00 kworker/1:2-events 7958 ? 00:00:00 kworker/1:1H 8013 ? 00:00:00 kworker/3:2-events 8041 ? 00:00:00 kworker/3:2H 8051 ? 00:00:00 kworker/u8:1-events_unbound 8063 ? 00:00:00 kworker/0:0H 8078 ? 00:00:00 kworker/1:1-events_freezable 8085 ? 00:00:00 kworker/1:2H 8090 ? 00:00:00 kworker/2:1H 8092 ? 00:00:00 kworker/0:2 8114 ? 00:00:00 kworker/3:1-events 8120 ? 00:00:00 kworker/u8:2-events_unbound 8146 ? 00:00:00 kworker/3:0H 8151 pts/0 00:00:00 sleep 8152 pts/0 00:00:00 ps frank@frank-desktop:/etc$ ***** sleep shows up because thttpd_wrapper ended up being started after thttpd was already running, as soon as the wrapper stopped, sleep was gone. ***** frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ sudo kill 6676 6677 7786 8151 [sudo] password for frank: kill: (8151): No such process frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ I forgot to kill all of the old thttpd PIDs. I typed them into the directions but not into the command line! The best solution is to send the "kill" line again and it will say that those numbers are not there! So running this part again, we should get what one should actually see! ***** frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ sudo ./rc.local # (Starting thttpd from rc.local, REMEMBER the sudo!!!!!!) My IP address is 192.168.19.13 Starting thttpd. thttpdfrank@frank-desktop:/etc$ frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ ps -e PID TTY TIME CMD 1 ? 00:00:09 systemd 2 ? 00:00:00 kthreadd 3 ? 00:00:00 rcu_gp 4 ? 00:00:00 rcu_par_gp 8 ? 00:00:00 mm_percpu_wq ... 8464 ? 00:00:00 kworker/3:2 8479 ? 00:00:00 kworker/3:2H 8487 pts/0 00:00:00 thttpd_wrapper 8488 ? 00:00:00 thttpd 8489 ? 00:00:00 kworker/0:0H 8493 pts/0 00:00:00 ps frank@frank-desktop:/etc$ This is what it should have looked like, 8487 for thttpd_wrapper, and 8488 for thttpd. These are the normal files that should show. ***** Again entering 192.168.19.13/ into the browser: Index of / mode links bytes last-changed name dr-x 3 4096 Sep 1 01:35 ./ dr-x 5 4096 Aug 31 23:07 ../ dr-x 2 4096 Aug 30 19:21 ac0xl/ -r-- 1 533 Aug 31 21:53 favicon.ico -r-- 1 308 Aug 31 21:53 readme.txt -r-- 1 27 Aug 31 21:53 robots.txt ***** frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ cat /home/local/www/logs/*log 127.0.0.1 - - [31/Aug/2021:23:38:28 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:29 +0000] "GET /favicon.ico HTTP/1.1" 404 0 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:33 +0000] "GET /ac0xl/ HTTP/1.1" 200 25000 "http://localhost/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 127.0.0.1 - - [31/Aug/2021:23:38:40 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" 127.0.0.1 - - [31/Aug/2021:23:38:46 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" 127.0.0.1 - - [31/Aug/2021:23:39:00 +0000] "UNKNOWN UNKNOWN" 400 0 "" "" 192.168.19.13 - - [01/Sep/2021:02:06:36 +0000] "GET / HTTP/1.1" 200 25000 "" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:06:36 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:08:15 +0000] "GET /ac0xl/ HTTP/1.1" 200 25000 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:08:32 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:08:32 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.19.13/readme.txt" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:08:40 +0000] "GET /robots.txt HTTP/1.1" 200 27 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:38:31 +0000] "GET / HTTP/1.1" 200 25000 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:38:34 +0000] "GET /ac0xl/ HTTP/1.1" 200 25000 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:38:37 +0000] "GET /favicon.ico HTTP/1.1" 304 0 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:38:46 +0000] "GET /readme.txt HTTP/1.1" 200 308 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:38:47 +0000] "GET /favicon.ico HTTP/1.1" 200 533 "http://192.168.19.13/readme.txt" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" 192.168.19.13 - - [01/Sep/2021:02:38:51 +0000] "GET /robots.txt HTTP/1.1" 304 0 "http://192.168.19.13/" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91.0" frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ ***** frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ sudo kill 8487 8488 frank@frank-desktop:/etc$ sudo kill 8487 8488 # entering the command twice shows that it actually killed the processes. kill: (8487): No such process kill: (8488): No such process frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ ***************************** 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. ***** frank@frank-desktop:~$ frank@frank-desktop:~$ sudo cp -iav /home/local/man/ /usr/local/man/ [sudo] password for frank: '/home/local/man/' -> '/usr/local/man/man' '/home/local/man/man1' -> '/usr/local/man/man/man1' '/home/local/man/man1/makeweb.1' -> '/usr/local/man/man/man1/makeweb.1' '/home/local/man/man1/htpasswd.1' -> '/usr/local/man/man/man1/htpasswd.1' '/home/local/man/man8' -> '/usr/local/man/man/man8' '/home/local/man/man8/thttpd.8' -> '/usr/local/man/man/man8/thttpd.8' '/home/local/man/man8/redirect.8' -> '/usr/local/man/man/man8/redirect.8' '/home/local/man/man8/ssi.8' -> '/usr/local/man/man/man8/ssi.8' '/home/local/man/man8/syslogtocern.8' -> '/usr/local/man/man/man8/syslogtocern.8' frank@frank-desktop:~$ frank@frank-desktop:~$ ***************************** Adding more Web Users, (Headings). Other ideas for web "users" could be: documents, downloads, games, memes, music, notices, pictures, videos, etc., just categories of what you want on your website, or what you want to share. This time we will use a different process to add only www users. frank@frank-desktop:~$ addgroup --help adduser [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--gecos GECOS] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--add_extra_groups] [--encrypt-home] USER Add a normal user Again the process: sudo adduser --ingroup www videos # (new web user "videos") (use a password that is different from the one for "(frank)") su videos # (shell to user "videos") makeweb exit # (exit the shell back to where you were) ********* 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. ******************** Lets try adding "documents". ***** frank@frank-desktop:~$ frank@frank-desktop:~$ sudo adduser --ingroup www documents [sudo] password for frank: Adding user `documents' ... Adding new user `documents' (1002) with group `www' ... Creating home directory `/home/documents' ... Copying files from `/etc/skel' ... New password: BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word Retype new password: passwd: password updated successfully Changing the user information for documents Enter the new value, or press ENTER for the default Full Name []: documents Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y frank@frank-desktop:~$ frank@frank-desktop:~$ ***** frank@frank-desktop:~$ frank@frank-desktop:~$ ls -al /home total 20 drwxr-xr-x 5 root root 4096 May 28 16:33 . drwxr-xr-x 20 root root 4096 Apr 21 18:13 .. drwxr-x--- 2 ac0xl www 4096 May 27 16:52 ac0xl drwxr-x--- 2 documents www 4096 May 28 16:39 documents drwxr-x--- 21 frank frank 4096 May 27 13:04 frank frank@frank-desktop:~$ ***** frank@frank-desktop:~$ frank@frank-desktop:~$ su documents Password: documents@frank-desktop:/home/frank$ documents@frank-desktop:/home/frank$ cd # changing into the directory: /home/documents, since we are now user "documents". documents@frank-desktop:~$ ls -al total 20 drwxr-x--- 2 documents www 4096 May 28 16:33 . drwxr-xr-x 5 root root 4096 May 28 16:33 .. -rw-r--r-- 1 documents www 220 May 28 16:33 .bash_logout -rw-r--r-- 1 documents www 3771 May 28 16:33 .bashrc -rw-r--r-- 1 documents www 807 May 28 16:33 .profile documents@frank-desktop:~$ ***** documents@frank-desktop:~$ makeweb Created web directory /home/local/www/users/documents Created symbolic link /home/documents/public_html documents@frank-desktop:~$ ***** documents@frank-desktop:~$ ls -al total 20 drwxr-x--- 2 documents www 4096 May 28 16:37 . drwxr-xr-x 5 root root 4096 May 28 16:33 .. -rw-r--r-- 1 documents www 220 May 28 16:33 .bash_logout -rw-r--r-- 1 documents www 3771 May 28 16:33 .bashrc -rw-r--r-- 1 documents www 807 May 28 16:33 .profile lrwxrwxrwx 1 documents www 30 May 28 16:37 public_html -> /home/local/www/users/documents ***** documents@frank-desktop:~$ exit # (exit the shell back to where you were) exit frank@frank-desktop:~$ frank@frank-desktop:~$ cat /etc/group root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4:syslog,frank tty:x:5: disk:x:6: lp:x:7: mail:x:8: news:x:9: uucp:x:10: man:x:12: proxy:x:13: kmem:x:15: dialout:x:20:ac0xl fax:x:21: voice:x:22: cdrom:x:24:frank,ac0xl floppy:x:25:ac0xl tape:x:26: sudo:x:27:frank audio:x:29:pulse,ac0xl dip:x:30:frank www-data:x:33: backup:x:34: operator:x:37: list:x:38: irc:x:39: src:x:40: gnats:x:41: shadow:x:42: utmp:x:43: video:x:44:ac0xl sasl:x:45: plugdev:x:46:frank,ac0xl staff:x:50: games:x:60: users:x:100:ac0xl nogroup:x:65534: systemd-journal:x:101: systemd-network:x:102: systemd-resolve:x:103: systemd-timesync:x:104: crontab:x:105: messagebus:x:106: input:x:107: kvm:x:108: render:x:109: syslog:x:110: tss:x:111: bluetooth:x:112: ssl-cert:x:113: uuidd:x:114: tcpdump:x:115: ssh:x:116: avahi-autoipd:x:117: rdma:x:118: rtkit:x:119: netdev:x:120: avahi:x:121: lpadmin:x:122:frank nm-openvpn:x:123: whoopsie:x:124: sssd:x:125: scanner:x:126:saned saned:x:127: colord:x:128: geoclue:x:129: pulse:x:130: pulse-access:x:131: gdm:x:132: lxd:x:133:frank systemd-coredump:x:999: frank:x:1000: sambashare:x:134:frank www:x:135:frank,ac0xl ac0xl:x:1001: frank@frank-desktop:~$ ********* ***** frank@frank-desktop:~$ frank@frank-desktop:~$ ls -al /home/local/www/users total 16 drwxrwxr-x 4 root www 4096 May 28 16:37 . drwxr-xr-x 5 root www 4096 May 26 14:18 .. drwxr-xr-x 2 ac0xl www 4096 May 27 16:18 ac0xl drwxr-xr-x 2 documents www 4096 May 28 16:37 documents frank@frank-desktop:~$ frank@frank-desktop:~$ From all of this we can see "documents" is owned by "documents" and is in group "www", but does not show in the "www:x:135:" group. From adduser "Adding new user `documents' (1002) with group `www' ..." . We also do not see user (1002) listed in "/etc/group". This is all OK. ********* Remember, instead of using the "names" that we assign to "groups", the computer uses the "numbers" it assigns to these "groups". It might be a good idea to write down the names and the numbers that the computer assigns. ***************************** frank@frank-desktop:/etc$ frank@frank-desktop:/etc$ less services # This will show a listing of service ports. ... (This file has a list of "Ports" that are in use. The default "HTTP port is 80.") thttpd's default port is 80, port numbers are 16-bit so can range from 1 - 65536. Only one service can use a port number at a time, thus we see that my Raspberry Pi web server will give the same information on all of the IPv4 addresses that are attached to it, i.e., eth0, and wlan0 with its different IP addresses are both connected to the same http port 80. In a classroom situation, more than 200 students can be connected to the same "C" class network (192.168.xxx.0/24) and can each connect to each other's web servers, where xxx is the same for all, and the 0 position can very from 2 - 254, with 0 representing the network, 255 is reserved for the broadcast address, and 1 reserved for the router address. With the router set up as a “DHCP Server” all of the computers would receive dynamic IP addresses and all of their http websites would be available in the addresses they were assigned. The http port number (80) is assigned by the computers and the IP addresses are assigned from the router. The router separates the “Local Area Network” (LAN) from the “Wide Area Network” (WAN). Just as the HTTP default address is port 80 and is static, the router has to have the internal IP address for our website “static” so it can pass information back and forth from our internal web server to the external Internet. In the file “2019-10-01-website.txt” I discuss the process of setting the internal web server to a static internal IP address. In the router, under the “Advanced” tab, select “Virtual Server”, and it should display a message similar to: “This page allows you to configure a virtual server, so others can access the server through the Gateway.” This will probably very with different routers so one might have to search a bit to find the similar place. The “usual Service Name” should have a selection of something like “web” or “http” and choose this. It should then show the “Protocol” as “TCP”, “WAN Port” as “80”, and “LAN Open Port” as “80”. In the “LAN IP Address” type in the static internal IP address of your web server, and press, “Apply Changes”. This should fill in a table in “Current Virtual Server Forwarding Table” with “ServerName - WEB”, “Protocol - tcp”, “Local IP Address - 192.168.x.2” i.e., your internal IP address, “Local Port - 80-80”, “WAN Port - 80-80”, “State - Enable”, and possibly “Action either Delete or Disable”. With this enabled, your website should be available to the WAN. Since your ISP is providing your external IP address, it doesn’t matter if it is dynamic or static. Until you get an idea of the activity that is taking place on the web, it would probably be good just to have a dynamic address if that is what you have. If you are in an area of extreme censorship, it will make the censorship game more of a “Cat and Mouse” game since your site could be bouncing around all sorts of different IP addresses. “Free Speech for the WORLD!” Another reason we use "/home" user directories in the "www" group is to be able to keep all of our original web files there and then just send a copy to the "public_html" directory where it is instantly live. This also reduces the size of our web site by eliminating the bloat of having original files mixed in with our files needed for the web site. It will also reduce the time it will take for the Web Search "spiders" to see what content is available on our sites. When we use "HTML" code for our web pages, the root of the page will be in "index.html" and then the items listed in this file can be in the same directory or in sub directories. If you have a lot of "images" on your web page, you would probably want to put all of them in a sub-directory called, "images" just to keep similar things together and easier to find. To test your "index.html" file, you just open it with a web browser and see if everything is functioning. Then when everything is OK, just move your changed file and additions to "public_html", and then open your web browser to "http://xxx.xxx.xxx.xxx/" and see if everything is working. Most web browsers keep a copy of your pages in cache so if the changes don't appear you will have to refresh your web page (usually the little circle with an arrow on it). If the changes still don't appear, possibly you forgot to move the changes to "public_html". Just a reminder, all of the directories in "public_html" need to be "0755" to work and files need to be "0644" to work. If you get to the point of using "cgi" programs they will also need to be "0755" so they can execute, and also need to have the right ending on those files, the documentation for "thttpd" talks about all of this. Sometimes I even need to use "0754" if it is a program type file that should be readable. ***************************** Https://news.netcraft.com - August 2021 Web Server Survey - 25th August, 2021 In the August 2021 survey we received responses from 1,211,444,849 sites across 263,733,974 unique domains and 11,327,711 web-facing computers. This reflects a loss of 4.99 million sites, but a gain of 1.64 million domains and 67,600 computers. ***************************** 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: Zonet1), ZSR4154WE(01), 802.11n Wireless Broadband Router, Power: 9V-1A, 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 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 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. ***************************** Links: These links are the easiest and best I have found for sharing the “Good News” I found around my seventh birthday, the Fall of 1955. Frank Anderson, ac0xl. http://4laws.com/laws/languages.html, 4 Spiritual Laws. https://www.cru.org/us/en/train-and-grow/spiritual-growth/the-spirit-filled-life.html, The Spirit Filled Life. https://www.cru.org, Exploring Your Life’s Purpose - Let’s journey together. https://godtoolsapp.com, GodTools - Helping You Share Your Faith. # ***************************************