How to Setup a Linux Web Server

I welcome your questions and comments. Email me at y2kLeader@gmail.com.

Notes:
  • Since the writing of the book, it has become much more complicated to send email from a home server because of all the black hat hackers. My upcoming book "How to Setup a Raspberry Pi Web Server" has a solution. I am providing you free an excert from that book. You can view or download the PDF file by clicking here.

  • If you are having trouble using the FTP, you probably need to change the user of the /var/www folder from "root" to "john" (or whatever your linux server login is).
    At the linux server command prompt, type: sudo chown -R john /var/www

    There is a space between chown and -R. There is a space between -R and john. there is a space between john and /var/www.

  • If the newer versions of the Linux Server that you downloaded from the ubuntu.com website isn't working for you, try the older versions from the links below.

  • The top of page 137 reads:
    designate with a single backslash “ \ “ without the quotes. To create the file type:
    sudo nano \WrightDDNS

    It should read:

    designate with a single forward slash " / " without the quotes. To create the file type:
    sudo nano /WrightDDNS

    Thanks to Inge Vabekk who pointed out the error.

Downloads
Ubuntu.com Download Site
Putty.exe (https://www.putty.org) (Putty SSH Client)
WinSCP (FTP Software)
Menu
WrightDDNS from pg. 136 index.html with guestbook from pg.176
Guest Form HTML Code addguest.php
Visitor Counter HTML Code Visitor Counter PHP Code


WrightDDNS from pg. 136

  1. Highlight the code below and copy it.
  2. Save it into the root directory a file named "WrightDDNS".
  3. Note: Page 139 shows you how to launch this program, HOWEVER you must use "sudo" without the quotes. So the command at the end of your crontab file shoud read: "1 0-23 1-31 1-12 1-7 sudo bash WrightDDNS" without the quotes. The book forgot the sudo command.
  Select All

index.html with guestbook from pg.176

  1. Highlight the code below and copy it.
  2. Savie it as "index.html" in the /var/www directory.
  3. Note: The paypal button HTML on this page (lines 19-29) must be changed and replaced by your own paypal button code if you are going to use it.
  Select All

Guest Form HTML Code

  1. Highlight the code below and copy it.
  2. Save as it's own web page or embedded into another html page such as index.html.
  Select All

addguest.php

  1. Highlight the code below and copy it.
  2. Save it as addguest.php in the /var/www directory.
  Select All

Vistior Counter HTML Code

  1. Highlight the code below and copy it.
  2. Paste this in your index.html file after the body tag.
  Select All

Vistior Counter PHP Code

  1. Highlight the code below and copy it.
  2. Save it as counter.php in the /var/www directory.
  Select All