Merge branch 'master' of feistymeow.org:feisty_meow
authorChris Koeritz <fred@gruntose.com>
Sun, 19 Nov 2017 14:12:09 +0000 (09:12 -0500)
committerChris Koeritz <fred@gruntose.com>
Sun, 19 Nov 2017 14:12:09 +0000 (09:12 -0500)
documentation/cygwin_install_list.txt
documentation/feisty_meow_command_reference.txt
production/feisty_meow_config.ini
production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html
production/sites/cakelampvm.com/rolling/default_page.001/001-default-http.conf [new file with mode: 0644]
production/sites/cakelampvm.com/rolling/default_page.001/001-default-ssl.conf [new file with mode: 0644]
scripts/site_avenger/clean_mapsdemo.sh [new file with mode: 0644]
scripts/site_avenger/revamp_cakelampvm.sh
scripts/system/add_apache_site.sh
scripts/system/common_sysadmin.sh

index acd8d7775c871f938d4a091a34bbb927dc43123a..0d881b6175209f60236d7f09bf01844d1a2da7b8 100644 (file)
@@ -1,65 +1,69 @@
-\r
-recommended packages to install in cygwin's setup\r
-if you're going to use cygwin on windows:\r
-\r
-first, keep all the standard packages that cygwin will enable.\r
-second, add these packages to get the full recommended set...\r
-\r
-===========\r
-\r
-using apt-cyg (https://github.com/transcode-open/apt-cyg),\r
-this is the only command needed:\r
-\r
-apt-cyg install bc crypt emacs email expect gcc-g++ git gitk gvim inetutils \\r
-  libcrypt-devel libcurl-devel libgnutls-devel make mutt ncftp openssh \\r
-  openssl-devel perl python subversion time unzip util-linux vim xinit \\r
-  xterm zip\r
-\r
-\r
-===========\r
-\r
-list broken out by category:\r
-\r
-shells:\r
-  python\r
-  perl\r
-\r
-network:\r
-  ncftp\r
-  openssh\r
-\r
-editors:\r
-  vim\r
-  gvim\r
-  emacs\r
-\r
-revision control:\r
-  git\r
-  gitk\r
-  subversion\r
-\r
-general tools:\r
-  bc\r
-  expect\r
-  util-linux\r
-  inetutils\r
-  email\r
-  mutt\r
-  unzip\r
-  zip\r
-  crypt\r
-  time\r
-\r
-libraries:\r
-  libcurl-devel\r
-  libgnutls-devel \r
-  openssl-devel\r
-\r
-build tools:\r
-  gcc4\r
-  make\r
-\r
-x window support:\r
-  xterm\r
-  xinit\r
-\r
+
+The cygwin setup app is available at: http://cygwin.com
+
+The default packages selected by Cygwin are a good starting point for running
+Feisty Meow on windows.  If you supplement this set with a few additional
+packages, you can rely on the apt-cyg tool rather than having to run the
+Cygwin setup program (which can be a little fiddly).  Here is a step by step
+process to getting going with apt-cyg:
+
+1) Install Cygwin.
+
+Run the Cygwin setup exe from their website.  Keep all the default packages
+that the installer suggests, but add the following additional ones (the
+easiest way to add additional packages is to switch to the "Full" view for the
+package list and then search for the terms below):
+
+  + lynx
+  + wget
+  + subversion
+
+2) Install apt-cyg.
+
+The apt-cyg program brings the convenience of the Debian and Ubuntu installer
+application (apt) to Cygwin.  This program does require a couple of additional
+setup steps.
+
+This material is drawn from the apt-cyg home page:
+  https://github.com/transcode-open/apt-cyg
+
+Start the cygwin bash prompt (there should be a desktop icon or start menu
+icon for it called something like "cygwin64") and run the following
+commands (omitting the '#' in front):
+
+  # lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
+  # install apt-cyg /bin
+
+3) Install the basic set of cygwin apps and libraries.
+
+These tools are not necessarily needed by the Feisty Meow scripts, but they
+are all required to create a sane and useful Unix or Linux environment on
+MS-Windows.  You may find you will want additional packages installed in the
+future, and you can use this same approach.
+
+In the cygwin bash prompt, type this command:
+
+# apt-cyg install bc crypt cygutils emacs email expect gcc-g++ git gitk \
+  gvim inetutils less lynx make mutt ncftp openssh perl procps python \
+  sharutils shutdown subversion time unzip util-linux vim wget xinit \
+  xterm zip
+
+You may have cleverly spotted that we repeated some package names that were
+already installed using the Cygwin setup program in step 1.  That is fine and
+should just fetch the latest versions.
+
+Later, to update the apt-cyg package datebase to the latest available on the
+internet, you can run this command:
+
+# apt-cyg update
+
+We don't currently know of an analog in apt-cyg of the "apt dist-upgrade"
+command, which fetches all updated versions of the installed packages.  We
+think the install command above will upgrade packages when there are new ones
+available.  Also, the cygwin setup tool (bless its heart) may automatically
+update packages if you run it again (you don't need to select anything again,
+but just run through the install process to get the latest).
+
+==> hmmm: verify above claims.
+
+
index 5cbd70e302b24e64bd228701ac79a06592dc33e6..75371b11ba697be5f89127803283f8df363f7fc5 100644 (file)
@@ -4,8 +4,8 @@ Welcome, adventurous script user.
 These are the handiest commands available in the Feisty Meow scripts.
 Note that each script is expected to be self-documenting.  Try running it
 with a "--help" flag (or with no parameters in some cases) to print the
-built-in docs.  At worst, you may have to read the script (documentation
-fail--please let us know).
+built-in docs.  At worst, you may have to read the script (that is a
+"documentation fail" on our part; please let us know).
 
 setup and loading commands
 ==========================
@@ -13,6 +13,38 @@ setup and loading commands
 + read "readme.txt" in the top of the feisty meow codebase, or
 + read it online at: https://feistymeow.org/feisty_meow/readme.txt
 
+generally useful commands
+=========================
+
+  pwd:
+  reports similarly to the good old system "pwd", but translates the $HOME
+  variable into the '~' name.  e.g., if you're fred in /home/fred/turnips
+  and you run 'pwd', then it will print: ~/turnips
+
+  i:
+  take inventory.  prints out some time and relative dimension in space
+  information and shows the current directory's contents.
+
+  dir or l (lower-case L):
+  show the directory with a "summing" feature that calculates the full size
+  consumed by all files in the listing, with somewhat esthetic output.
+
+  ls:
+  the standard ls command (not the summing directory), but with ls colors
+  enabled.
+
+  del or rm:
+  invoke "safedel" feature to remove the files specified.  this archives the
+  deleted files in "$TMP/zz_safedel_keep" and writes a report of the deletion
+  history in "$TMP/zz_safedel_report.txt".
+
+note: currently there is no "empty the trash" function aside from running a
+command such as:
+  # \rm -rf $TMP/zz_safedel*
+the backslash forces bash to run the "rm" tool from the path rather than
+using the feisty meow alias.  a trash flushing feature is planned for the
+somewhat near future.
+
 revision control commands
 =========================
 
@@ -123,8 +155,9 @@ overriding the domain name for the mapsdemo application.
   powerup:
   similar to standup, but just gets the application source out and powers it
   up with composer.
-(note: automatic database configuration and inflation is in the pipeline but
-is not ready yet.  that will go into powerup.)
+
+(note: automatic database configuration and inflation is in the pipeline for
+the powerup command, but is not ready yet.)
   
   avcoreup:
   updates the avcore portion of a site avenger application.  this command can
@@ -140,19 +173,27 @@ is not ready yet.  that will go into powerup.)
   checks in the source code and other site assets for a site avenger app.
   supports passing an app name on the command line, or auto-picks the app.
 
-
   satis-refresh:
   updates satis for a site(?).
-note: this is the one site avenger command that hasn't been "feisty meowicized" yet.
 
-lower level scripts used by site avenger scripts:
+note: satis-refresh is the one site avenger command that hasn't been "feisty meowicized" yet.
+
+lower level scripts used by site avenger scripts
+------------------------------------------------
+
+  add_domain and remove_domain: (from system script collection)
+  adds (or removes) a DNS domain to the bind9 configuration.  the domain
+  tools, are very sensitive to any edits within the chunks of code they have
+  written.  when it comes time to remove the domain again, the script will eat
+  the number of lines it expects to find after the beginning of the domain
+  definition that it added.  to avoid any issues, if you need to edit the bind
+  config files, be sure to do it way above or way below the auto-generated
+  domain chunks.
+
+  add_apache_site and remove_apache_site: (from system script collection)
+  creates (or removes) an apache compatible site definition.  this will rely
+  on the site's domain previously having been added to the DNS.
 
-  add_domain / remove_domain: (from system script collection)
-  adds a DNS domain to the bind9 configuration.
-  (the domain tools, for example, are
-    very sensitive to edits within the chunks of code they have written.  if you
-  need to edit bind config files, be sure to do it way above or way below the
-  auto-generated domains.)
+note: currently we only implement the http site, but we're planning to add https support via self-signed certificates soon.
 
-  add_apache_site / remove_apache_site:
 
index 7abba84985ba34a03701cc1c71eb7d042579530e..9ebbd74ecdee5393a98377b8db0a34f98d672dd4 100644 (file)
@@ -3,7 +3,7 @@
 # specifies the version of the code that is being constructed here.
 major=2
 minor=140
-revision=100
+revision=101
 build=420
 
 # specifies the remainder of the version record info.
index 010635031446c218a7c9610bd20f074ee0a52ac3..561e734a85f5a25492c222400b088e7ff33b12c8 100644 (file)
@@ -9,8 +9,8 @@
       Configuration and Usage</h1>
     <h2 style=" text-align: center;">By Chris Koeritz</h2>
     <h3 style="   text-align: center;"> Vintage: cakelampvm v002 &nbsp;&nbsp;
-      Updated: 2017-11-16</h3>
-    <p>The cakelampvm project provides a virtualbox VM that acts as an "internet
+      Updated: 2017-11-16 (rev E)</h3>
+    <p>The cakelampvm project provides a Virtualbox VM that acts as an "internet
       in a bottle".&nbsp; The virtual machine provides DNS services (<a title="dns server"
         href="http://www.bind9.net/">bind9</a>), a Web server (<a title="patchy"
         href="https://httpd.apache.org/">Apache2</a>), a full <a title="ubuntu means compassion and humanity"
       the <a title="flux is change" href="http://fluxbox.org/">Fluxbox</a> <a
         title="a better windows" href="https://www.x.org/">X window manager</a>,
       and a suite of tools called the <a title="feisty meow® concerns ltd. website"
-        href="https://feistymeow.org/">Feisty Meow® codebase</a>
-      <meta http-equiv="content-type" content="text/html; charset=utf-8">
-      .&nbsp; Together, these services provide you with a very flexible and
-      powerful testbed for web development, especially suited for <a title="it's cake"
-        href="https://cakephp.org/">CakePHP</a>.</p>
-    <p>todo: arrange gritty details to back.</p>
-    <p>TOC GOES HERE.</p>
-    <h6> </h6>
-    <h2><span style="text-decoration: underline;">G</span>uest VM Configuration</h2>
+        href="https://feistymeow.org/">Feisty Meow® codebase</a> .&nbsp;
+      Together, these services provide you with a very flexible and powerful
+      testbed for web development, especially suited for <a title="it's cake" href="https://cakephp.org/">CakePHP</a>.</p>
+    <p>Commands preceded by an octothorpe ('#') below are intended to be typed
+      into a bash shell running on the cakelampvm virtual machine.&nbsp; The
+      bash shell can be obtained either by logging into the VM through ssh or by
+      logging in directly to the Virtualbox VM console.&nbsp; You may find the
+      ssh session more convenient, because copy &amp; paste features work as
+      expected.</p>
+    <p>Commands preceded by a greater-than symbol ('&gt;') are intended to be
+      run on the Host PC in a Windows command prompt (or in a bash prompt running
+      on the Host PC).</p>
+    <h2> Guest VM Configuration<a id="#config" name="#config"></a></h2>
     <ul>
-      <li>hostname: <a title="the vm's website, when configured properly" href="https://cakelampvm.com/">cakelampvm.com</a></li>
-      <li>local IP address: 10.28.42.20</li>
-      <li>services: DNS (bind9), apache2, fluxbox X windowing system, <a title="not just in the garden"
-          href="https://www.gnome.org/">gnome display manager</a></li>
-      <li>main user: developer (password distributed separately)</li>
-      <li>mysql root password: (password distributed separately)</li>
+      <li>Hostname: <a title="the vm's website, when configured properly" href="https://cakelampvm.com/">cakelampvm.com</a></li>
+      <li>Local IP Address: 10.28.42.20</li>
+      <li>Services Included: DNS (bind9), apache2, fluxbox X windowing system, <a
+          title="not just in the garden" href="https://www.gnome.org/">gnome
+          display manager</a></li>
+      <li>Main VM User: developer (password distributed separately)</li>
+      <li>Database Access: mysql root account, password: (password distributed
+        separately)</li>
     </ul>
-    <h2>Powering up with the Feisty Meow® scripts</h2>
-    <p>[First, let me drop the registered trademark symbol from here on
-      in.&nbsp; I hope its presence above has been sufficiently clear for legal
-      purposes, but now it will just get in the way.&nbsp; Also, capitalization
-      really bores me, and it's the feisty meow codebase anyhow, so that's how
-      it will be written henceforth.]</p>
-    <p>The feisty meow scripts are a cohesive bash scripting environment for
-      getting a variety of tasks done.&nbsp; The scripts recently incorporated
-      the 'avbash' collection from Saco Designs, which provides tools for
-      bringing up CakePHP web sites and managing the collection of repositories
-      for those sites.&nbsp; Each website is considered an "application", and
-      the application name itself (e.g. "winterportlibrary") can often provide
-      all the details for "powering up" the site.&nbsp; The feisty meow team has
-      added additional scripts for managing DNS domains and Apache websites that
-      provide the capability to "stand up" an entire website around an
-      application, with accompanying domain.</p>
-    <p>The scripts for now are documented separately within the Feisty Meow
-      codebase.&nbsp; The Feisty Meow readme file provides some valuable
-      information on configuring the codebase.&nbsp; If you have the cakelampvm,
-      then this has already been done for you on the vm in the developer account.&nbsp;
-      The script documentation is available in the UHHHHHH page of something..</p>
-    <h2>How to set up virtualbox for your host PC</h2>
+    <h2>Powering up with the Feisty Meow® scripts<a id="#powerup" name="#powerup"></a></h2>
+    The feisty meow scripts are a cohesive bash scripting environment for
+    getting a variety of tasks done.&nbsp; The feisty meow scripts recently
+    incorporated the "avbash" collection from Saco Designs and added those
+    scripts to a new "site_avenger" collection of scripts.&nbsp; The site
+    avenger scripts provide tools for bringing up CakePHP web sites and managing
+    the collection of repositories for those sites.&nbsp; Each website is
+    considered an "application", and the application name itself (e.g.
+    "winterportlibrary") can often provide all the details for "powering up" the
+    site.&nbsp; The feisty meow team has added additional scripts for managing
+    DNS domains and Apache websites that provide the capability to "stand up" an
+    entire website around an application, with an accompanying DNS domain and
+    Apache2 site definition.
+    <p>The site avenger scripts are documented separately within the feisty meow
+      codebase.&nbsp; Consult the <span style="text-decoration: underline;">f</span><a
+        title="quickstart" href="https://feistymeow.org/feisty_meow/readme.txt">eisty
+meow
+        readme</a> file first, as it provides some valuable information on
+      configuring the codebase initially.&nbsp; The site avenger script commands
+      are documented in the <a title="useful commands" href="https://feistymeow.org/feisty_meow/documentation/feisty_meow_command_reference.txt">feisty
+        meow command reference</a> file.</p>
+    <p>(The feisty meow codebase is already configured for the developer account
+      on the cakelampvm virtual machine.)</p>
+    <h2>How to set up virtualbox for your host PC<a id="#virtualbox-setup" name="#virtualbox-setup"></a></h2>
     <ol>
       <li>Download and install virtualbox:
         https://www.virtualbox.org/wiki/Downloads</li>
-      <li>Install the extension pack for virtualbox: This provides USB drivers
-        and other features.&nbsp; This is installed on virtualbox itself, not on
-        the guests.</li>
+      <li>Install the extension pack for Virtualbox: This provides USB drivers
+        and other features.&nbsp; This is installed on Virtualbox itself (on the
+        Host PC), not on the guests.</li>
       <ol>
         <li>Download the extension pack at
           https://www.virtualbox.org/wiki/Downloads</li>
-        <li>Stop any running virtualbox vms.</li>
-        <li>Close virtualbox control panel.</li>
+        <li>Stop any running Virtualbox VMs.</li>
+        <li>Close the Virtualbox control panel.</li>
         <li>Double-click on the downloaded extensions package (in a file
-          explorer) and virtualbox should install it.</li>
+          explorer) and Virtualbox should be launched to install it.</li>
       </ol>
-      <li>Run the virtualbox control panel.</li>
+      <li>Run the Virtualbox control panel.</li>
       <li>Download the cakelampvm guest vm package and unzip it.&nbsp; Store the
         unzipped version in some appropriate place where you want the virtual
         machine to reside on your host's hard drive.</li>
-      <li>Add the guest VM to your list of VMs.&nbsp; From the virtualbox menus,
+      <li>Add the guest VM to your list of VMs.&nbsp; From the Virtualbox menus,
         choose the "Machine" menu and select "Add".&nbsp; Point the selector
         dialog at the cakelampvm folder you created above and open the
         cakelampvm.vbox file.</li>
         machines.&nbsp; Before starting it, perform the following network
         configuration sections.</li>
     </ol>
-    <h3>Configure the Host-Only network on virtualbox</h3>
+    <h3>Configure the Host-Only network on Virtualbox<a id="#host-only" name="#host-only"></a></h3>
     <p>Configuring host-only networking for the VM makes the VM completely local
       to your machine.&nbsp; The cakelampvm will not be accessible on the
       internet or from the LAN, and can only be accessed by your host PC.</p>
+    <p>Note: If the host-only or NAT network exist ahead of time, Virtualbox may
+      complain about them even if they have the correct configuration.&nbsp;
+      This can be corrected simply by opening the VM settings and selecting the
+      appropriate network names again.</p>
+    <p>To configure the host-only network, follow these steps:</p>
     <ol>
       <li> Go to virtual box "Preferences" (global preferences, not for a
         specific vm).</li>
         for convenience and stability.</li>
     </ol>
     <p>Additional information on host-only (and other) network adapter types is
-      at: https://www.virtualbox.org/manual/ch06.html#network_nat_service<br>
-    </p>
-    <h3>Configure the Nat Network on virtualbox</h3>
+      at: https://www.virtualbox.org/manual/ch06.html#network_nat_service</p>
+    <h3>Configure the NAT Network on Virtualbox<a id="#nat-network" name="#nat-network"></a></h3>
+    <p>The NAT (Network Address Translation) network allows the VM to get off of
+      the machine and onto the internet safely.&nbsp; It will use this interface
+      for any communication off of the host machine.&nbsp; Since the real IP
+      address of the VM is hidden behind the NAT firewall on Virtualbox, this
+      keeps the VM safe from attackers, and hence your machine stays safe as
+      well.</p>
+    <p>To set up the NAT network, follow these steps:</p>
     <ol>
       <li> Go to virtual box "Preferences" (global preferences, not for a
         specific vm).</li>
         These are my settings, with IPv6 left disabled:<br>
         <img alt="nat net config" src="images/nat_network_config.png"></li>
     </ol>
-    <h2>Start up the VM</h2>
-    <p>Using the virtualbox interface, you should now be able to start your
+    <h2>Starting up the VM<a id="#start-vm" name="#start-vm"></a></h2>
+    <p>Using the Virtualbox interface, you should now be able to start your
       virtual machine.&nbsp; Virtualbox will complain if it detects any
       remaining configuration problems in the VM, but it should start
       normally.&nbsp; The Linux boot sequence will show many lines of text,
       before bringing up a black console window with a login dialog.</p>
+    <p>If Windows complains about the Virtualbox application slamming into its
+      firewall, then allow the Virtualbox to get through.&nbsp; Usually, telling
+      Windows that once is enough, but if any odd network access problems result,
+      edit the Windows firewall settings and allow Virtualbox to use both
+      "Public" and "Private" networks.</p>
     <p>You can log in directly on the VM console with the developer account, but
       it is generally more useful to connect to the cakelampvm over ssh.&nbsp;
       If the networking has been established properly, you should be able to do
       this with:</p>
     <pre>ssh developer@cakelampvm.com&nbsp; (or equivalent with your ssh client)</pre>
     <p>And then provide the password to log in.</p>
-    <p>A feature called "X forwarding" is enabled, so if you start graphical
-      applications on the VM, you can display them from an appropriately
-      configured host.&nbsp; (If you're running Linux as the host for the VM,
-      you can definitely run remote windows.&nbsp; Windows may not support
-      that.)</p>
-    <p>#### check this!!!</p>
-    <h2>Using the guest VM's DNS services</h2>
+    <p>If a feature called "X forwarding" is enabled in your ssh client, then
+      you can start graphical applications on the VM and display them on your
+      local machine.&nbsp; This works right away on most Linux hosts, but can
+      also work on PCs with X window system installed.&nbsp; The section below
+      describes how to set up Cygwin to run X server, which enable X forwarding
+      to your local display.</p>
+    <p>...{insert that info}...</p>
+    <h2>Updating cakelampvm to the Latest Model<a id="#update-vm" name="#update-vm"></a></h2>
+    <p>The cakelampvm is released with the intention to not be released
+      again.&nbsp; Version 001 was not built with that explicit intention, which
+      then required the release of Version 002.&nbsp; We hope to not need a v003
+      release.</p>
+    <p>There is an update feature built into the VM that is quite easy to
+      use.&nbsp; The updates are driven by the feisty meow script repository in
+      conjunction with a local scripted command.&nbsp; To activate the "update
+      process" for your VM, run the following commands (without the initial '#'
+      symbol):</p>
+    <p># rpuffer $FEISTY_MEOW_APEX&nbsp;&nbsp; # updates to the latest version
+      of feisty meow<br>
+      # revamp_cakelampvm&nbsp;&nbsp;&nbsp; # enacts any configuration changes
+      needed, plus fixes web folder and other permissions.</p>
+    <p>These two commands can be run at any time to patch up your VM to the
+      latest.</p>
+    <p>The first command ("rpuffer ...") is also useful on its own for getting
+      the latest version of the feisty meow code.&nbsp; If there are bug fixes
+      you need for the scripts or you want updated cakelampvm documentation,
+      that is the command to use.</p>
+    <h2>Using the guest VM's DNS services<a id="#dns-from-vm" name="#dns-from-vm"></a></h2>
     <p>The cakelampvm has been set up to provide a DNS server which will answer
-      name requests for all of the sites that the VM hosts.</p>
+      name lookup requests on any of the sites that the cakelampvm is hosting
+      for you.&nbsp; It will also serve as a general DNS server for any other
+      domains that need to be looked up.</p>
     <p>To use the cakelampvm DNS, modify your host operating system network
       configuration by adding or changing the DNS server to use the guest VM's
-      DNS service.&nbsp; This is available at the local address
-      10.28.42.20.&nbsp; The DNS server can be tested with nslookup, dig and
-      other tools.</p>
+      DNS service.&nbsp; The cakelampvm is available at the local IP address
+      10.28.42.20.&nbsp; (The DNS server can be tested with nslookup, dig and
+      other tools.)</p>
     <p>Note that the cakelampvm DNS should be listed first, if one intends to
-      override any DNS names that actually exist out on the internet.</p>
-    <p>If the DNS server is properly set up, then these ping commands should get
-      answering responses:</p>
-    <pre>ping cakelampvm.com</pre>
-    <pre>ping defaultcake.cakelampvm.com</pre>
-    <pre>ping mapsdemo.cakelampvm.com</pre>
-    <h3>Setting up DNS on Windows</h3>
+      override any DNS names that actually exist out on the internet.&nbsp; We
+      have also found it most effective to have only the cakelampvm as your DNS
+      server, because a secondary DNS server can "take over" providing the name
+      lookups, and thus foul up DNS requests that should succeed for your
+      VM-hosted sites.</p>
+    <p>If your Host PC is running Windows, see the DNS configuration section
+      below that is tailored to that operating system.</p>
+    <p>Important Note: It behooves you to remember to switch back to a normal
+      DNS server configuration when you shut off the cakelampvm, or your machine
+      will not know the names of any sites on the internet any more!</p>
+    <p>Once the DNS server is properly set up (by whatever means necessary),
+      these ping commands should get answering responses (from 10.28.42.20) on
+      both the cakelampvm VM and on your host PC.&nbsp; Note: ping on Linux
+      keeps going forever, so hit control-C when you are tired of seeing the pings:</p>
+    <pre># ping cakelampvm.com</pre>
+    <pre># ping mapsdemo.cakelampvm.com</pre>
+    <p>Note that any other answer than 10.28.42.20 for the address is *bzzzt*
+      wrong, and means something needs to be fixed.</p>
+    <p>If these pings succeed (which hopefully they will!), then try accessing
+      the websites of each domain:</p>
+    <pre>(browse to) http://cakelampvm.com</pre>
+    <pre>(browse to) http://mapsdemo.cakelampvm.com</pre>
+    <p>These should show local sites on the VM rather than sites on the
+      internet.&nbsp; If you instead get failures to find the domains, or if the
+      "real internet" site comes up for cakelampvm.com (the page covered with
+      red X marks and complaining), then the DNS is not hooked up properly yet.</p>
+    <h4>Troubleshooting the DNS</h4>
+    <p>If your pings are getting the wrong answers and you're certain the DNS
+      settings on your Host PC are right, then you may need to flush your DNS
+      cache, and that might be sufficient.&nbsp; On Windows, the command for
+      flushing DNS is:</p>
+    <pre>&gt; ipconfig /flushdns</pre>
+    <p>and on Linux the flush DNS command can be many different things, but try
+      these two most common options:</p>
+    <pre># sudo service dns-clean restart&nbsp;&nbsp; # restarts the client side DNS cache.</pre>
+    <p>or</p>
+    <pre># sudo service nscd restart&nbsp;&nbsp; # restarts the nscd caching server.</pre>
+    After, this try the pings again.&nbsp; If they still fail, please go back
+    over your DNS configuration very carefully.&nbsp; The cakelampvm's DNS
+    feature *does* actually work, but operating systems sometimes do their best
+    to deny this.<br>
+    <h4>Troubleshooting the Apache Sites</h4>
+    <p>If your DNS pings and lookups are functioning properly, but you're just
+      not getting the right websites, then try clearing your browser's cache and
+      shutting the browser application down.&nbsp; Then, start the browser up
+      and try the address again.&nbsp; Often this cache dumping is enough to fix
+      the browser so that you start seeing the local website versions on
+      cakelampvm.com.</p>
+    <h3>Setting up DNS on Windows<a id="#windoze-dns" name="#windoze-dns"></a></h3>
     <p>The ipconfig tool will provide helpful information about your current
       networking and DNS configuration:</p>
     <pre>ipconfig --all</pre>
     <pre>Control Panel | Network &amp; Sharing | click WiFI or Ethernet link near top right | click Adapter Settings on left | click on specific network device to modify | select Properties</pre>
     <p><br>
     </p>
-    <p><br>
+    <p>{fill in rest}<br>
     </p>
     <p><br>
     </p>
-    <h2>Editing files on the guest VM from the host</h2>
+    <h2>Editing files on the guest VM from the host<a id="#editing-files-on-vm"
+        name="#editing-files-on-vm"></a></h2>
     <p>On the host computer, look for the guest vm as a networked computer
       called cakelampvm.&nbsp; This should provide some network shares using
       Microsoft SMB protocol, and they can be attached to using the "developer"
       for easier access.</p>
     <p>Currently, the root of all web servers is exposed as "www".&nbsp; Editing
       the files in those folders requires ownership by the developer user.&nbsp;
-      Currently the defaultcake server is owned by developer.</p>
-    <p>One should be able to create a new directory in the www folder owned by
-      the developer user over the network also, which can be used for creating
-      new projects.&nbsp; However, there is a config issue in the current vm
-      (v001) about this; to fix, run this command on the guest vm as the
-      developer user:</p>
-    <pre>sudo chmod g+w /var/www</pre>
-    <p>Afterwards, the www folder should allow the developer user to create new
-      folders at will.</p>
-    <h2>Accessing files on the host PC from the guest VM</h2>
+      The existing mapsdemo site is owned by a different user ("fred") rather
+      than developer, mostly as a test case.&nbsp; The "fred", "developer", and
+      "www-data" accounts on the VM have all been put into each others Unix
+      "groups" so that they can access each other's files, and thus you may not
+      notice any issues editing fred's files.</p>
+    <p>One should be able to create a new directory over the network also.&nbsp;
+      Try creating a junk folder in the "www" folder, and then deleting it
+      again.&nbsp; That should succeed, and this approach can be used to create
+      folders (from the Host PC) that are owned by the developer user (on the
+      VM).&nbsp; You should be able to create folders or copy files within the
+      developer's home folder also ("/home/developer").</p>
+    <p>If you run into any permission problems that prevent file access, either
+      remotely or within the VM itself, then try running this command to fix
+      them:</p>
+    <pre># revamp_cakelampvm</pre>
+    <p>Afterwards, the www folder and others should allow the developer user to
+      create new folders at will.</p>
+    <p>The revamp command above is also used to deliver new configuration to the
+      VM from the feisty meow script environment; running it after any update of
+      the feisty meow codebase is a good idea.</p>
+    <h2>Accessing files on the host PC from the guest VM<a id="#samba-shares" name="#samba-shares"></a></h2>
     <p>If you want to share a folder from the host to the guest, perhaps for
       driver updates or other conveniences, then make the share with these
       steps:</p>
     <ol>
       <li>Create a folder on the host that is to be shared.</li>
-      <li>Right-click on the vm in virtualbox manager and choose "Settings".</li>
+      <li>Right-click on the vm in Virtualbox manager and choose "Settings".</li>
       <li>In the "Shared Folders" tab of the settings, go to "Machine Folders".</li>
       <li>Click the folder plus icon to create a new share.</li>
       <li>Fill in the "Folder Path" on the host PC to the folder that will be
         shared, and give it a name for the guest.&nbsp; We assume the folder
         name will be "myshare".</li>
       <li>On the guest vm, run the following commands to mount the share:<br>
-        <pre>mkdir ~/shared&nbsp;&nbsp;&nbsp; # for the guest's version of the shared folder</pre>
-        <pre>sudo mount -t vboxsf myshare ~/shared&nbsp;&nbsp;&nbsp; # mount the vm's share name onto the folder on the vm.</pre>
+        <pre># mkdir ~/shared&nbsp;&nbsp;&nbsp; # for the guest's version of the shared folder<br># sudo mount -t vboxsf myshare ~/shared&nbsp;&nbsp;&nbsp; # mount the vm's share name onto the folder on the vm.</pre>
       </li>
     </ol>
     <h2>Adding a new website and domain on the guest VM</h2>
-    <p>To add a new website, you will need to pick one of the DNS options below
-      (A or B) depending on how you want to name the site.&nbsp; After the DNS
-      is updated, then follow the section after for creating a new apache conf
-      file.</p>
-    <p>Assuming one has created a new folder in "www" called "greatsite", then
-      the new web site can be brought online on the vm with one of the following
-      options.</p>
-    <h3>DNS Option A: Using a sub-domain in the cakelampvm.com domain</h3>
-    Connect to the cakelampvm via ssh as the developer user, e.g.: ssh
-    developer@cakelampvm.com
-    <p>Execute the following command to edit the DNS file for the cakelampvm
-      domain:</p>
-    <pre>sudo vi /etc/bind/cakelampvm.com.conf</pre>
+    <p>Note: these instructions, even the quick approaches below, pale in
+      comparison to the ease of use of the "standup" command in feisty meow's
+      site avenger scripts.&nbsp; The standup command is detailed in the&nbsp;<a
+        title="useful commands" href="https://feistymeow.org/feisty_meow/documentation/feisty_meow_command_reference.txt">feisty
+        meow command reference</a> document.&nbsp; These instructions are for
+      situations when the domain or site is idiosyncratic in some way that
+      standup doesn't support.</p>
+    <p>To add a new website, you will first need to pick one of the DNS options
+      below (A or B) depending on how you want to name the site.&nbsp; If the
+      DNS name of the site is contained within another existing domain (e.g.,
+      "A.B.C" has subdomain A contained in domain B.C), use Option A.&nbsp; If
+      the DNS name is a so-called "Second Level Domain" (SLD), then it stands on
+      its own (e.g., "B.C" is an SLD).</p>
+    <p>Once the DNS option has been picked and implemented, continue to the next
+      section of "Creating a New Apache Site".</p>
+    <p>For either Option A or Option B, first connect to the cakelampvm via ssh
+      as the developer user, e.g.: ssh developer@cakelampvm.com </p>
+    <h3>DNS Option A: Adding a sub-domain in an existing domain</h3>
+    <p>Let us say a customer needs an application called "excalibur".&nbsp; It
+      will be a new subdomain within an existing domain, such as the
+      "cakelampvm.com" domain, meaning we want the VM to start answering
+      requests for "excalibur.cakelampvm.com".</p>
+    Note that this option requires the containing domain "cakelampvm.com" to
+    already exist before adding the subdomain; see DNS Option B below for
+    details on how to add a containing domain for the first time.
+    <h4>Quick approach: Use the feisty meow "add_domain" command.</h4>
+    <p>Run this command in a bash shell on the VM:</p>
+    <pre># add_domain excalibur.cakelampvm.com</pre>
+    <p>Done.</p>
+    <h4>Manual approach: Edit the bind9 configuration.</h4>
+    <p>Note: the manual approach is not compatible with later use of feisty
+      meow's "remove_domain".</p>
+    Execute the following command to edit the DNS file for the cakelampvm
+    domain:
+    <pre># sudo vi /etc/bind/cakelampvm.com.conf</pre>
     <p>Add a stanza for the new site at the end of this file:</p>
-    <pre>greatsite.cakelampvm.com&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp; 10.28.42.20<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; IN HINFO "linux server" "ubuntu"</pre>
-    <p>Restart the DNS server: sudo service bind9 restart</p>
-    <p>Afterwards, pinging greatsite.cakelampvm.com should work from either the
-      guest or the host.</p>
+    <pre>excalibur.cakelampvm.com.&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp; 10.28.42.20<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; IN HINFO "linux server" "ubuntu"</pre>
+    <p>Restart the DNS server:</p>
+    <pre># sudo service bind9 restart</pre>
+    <p>Afterwards, pinging excalibur.cakelampvm.com should work from both the
+      guest VM and the host PC.</p>
     <h3>DNS Option B: Using an entirely new domain for the site</h3>
-    <p>Similar procedure to above, but we will create a new file for the new
-      domain and add it to the bind directory.&nbsp; For this example, we will
-      create a file called /etc/bind/greatsite.tv.conf for our new domain
-      greatsite.tv with these contents:</p>
-    <pre>$TTL 1W<br>@&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN SOA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fred.cakelampvm.com. (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2017100801&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; serial<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2H&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; refresh<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; retry<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; expiry<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6H )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; minimum<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ns.cakelampvm.com.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN MX&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mail.cakelampvm.com.<br><br># main domain for machine.<br>greatsite.tv.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.28.42.20<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN HINFO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "linux server" "ubuntu"</pre>
-    The gnarly prefix stuff above the "greatsite.tv." listing establishes
+    <p>This is a similar procedure to Option A, but we will create a totally new
+      config file for the new domain and add it to the bind directory.&nbsp; For
+      this example, we need to add the site "excalibur.tv" into the DNS.</p>
+    <h4>Quick approach: Use the feisty meow "add_domain" command.</h4>
+    Run this command in a bash shell on the VM:
+    <pre># add_domain excalibur.tv</pre>
+    <p>Done.</p>
+    <h4>Manual approach: Edit a new DNS config file</h4>
+    <p>Note: the manual approach is not compatible with later use of feisty
+      meow's "remove_domain".</p>
+    Create a file called /etc/bind/excalibur.tv.conf for our new domain
+    excalibur.tv with these contents:
+    <pre>$TTL 1W<br>@&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN SOA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fred.cakelampvm.com. (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2017100801&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; serial<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2H&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; refresh<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; retry<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 14D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; expiry<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6H )&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; minimum<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ns.cakelampvm.com.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN MX&nbsp;&nbsp; 10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mail.cakelampvm.com.<br><br># new SLD for our excalibur site.<br>excalibur.tv.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.28.42.20<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN HINFO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "linux server" "ubuntu"</pre>
+    The gnarly prefix stuff above the "excalibur.tv." listing establishes
     configuration info for the new domain.&nbsp; This file relies on the
     existing cakelampvm.com infrastructure in DNS, such as the "ns" host, which
-    is the domain's name server.
-    <p>Now that the config file is in place, edit "named.conf.local" to add the
-      new file by adding this bit of configuration at the end:</p>
-    <pre>zone "greatsite.tv" in {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file "/etc/bind/greatsite.tv.conf";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type master;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow-query { any; };<br>};</pre>
-    <p>Restart the DNS server: sudo service bind9 restart</p>
-    <p>Afterwards, pinging greatsite.tv should work from either the guest or the
+    is the domain's name server.&nbsp; However, the new domain does <span style="text-decoration: underline;">not</span>
+    live inside the cakelampvm.com domain.<br>
+    <p>Now that the config file is in place, edit "/etc/bind/named.conf.local"
+      to add the new file by adding this bit of configuration at the end:</p>
+    <pre>zone "excalibur.tv" in {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file "/etc/bind/excalibur.tv.conf";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type master;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow-query { any; };<br>};</pre>
+    <p>Restart the DNS server:</p>
+    <pre># sudo service bind9 restart</pre>
+    <p>Afterwards, pinging excalibur.tv should work from both the guest and the
       host.</p>
-    <h3>Create a new apache configuration file and load it</h3>
+    <h3>Creating a New Apache Site</h3>
+    <p>First, connect to the cakelampvm via ssh as the developer user, e.g.: ssh
+      developer@cakelampvm.com </p>
+    <h4>Quick approach: Use the feisty meow "add_apache_site" command.</h4>
+    <p>Run this command in a bash shell on the VM:</p>
+    <pre># add_apache_site excalibur excalibur.tv</pre>
+    <p>(The first parameter is the application name, the second is the domain
+      name.)</p>
+    <p>Done.</p>
+    <h4>Manual approach: Edit an Apache config file</h4>
+    <p>Note: the manual approach is not compatible with later use of feisty
+      meow's "remove_apache_site".</p>
+    <p>For Apache, the choice of DNS Option A or B, subdomain or SLD, does not
+      matter.&nbsp; The site configuration file just has to accurately specify
+      the domain in question.</p>
     <p>Start with the following template file for the new website, and modify it
-      for the appropriate host name:</p>
-    <pre>&lt;VirtualHost *:80&gt;<br>&nbsp;&nbsp;&nbsp; ServerName greatsite.cakelampvm.com<br>&nbsp;&nbsp;&nbsp; ServerAlias greatsite.cakelampvm.com *.greatsite.cakelampvm.com<br>&nbsp;&nbsp;&nbsp; DocumentRoot /var/www/greatsite<br>&nbsp;&nbsp;&nbsp; ErrorLog ${APACHE_LOG_DIR}/greatsite.cakelampvm.com-error.log<br>&nbsp;&nbsp;&nbsp; CustomLog ${APACHE_LOG_DIR}/greatsite.cakelampvm.com-access.log combined<br>&nbsp;&nbsp;&nbsp; Alias /statistics "/var/www/webwork.repository/webwork/maps_demo/webroot/statistics"<br>&nbsp;&nbsp;&nbsp; Include /etc/apache2/conf-library/basic-options.conf<br>&nbsp;&nbsp;&nbsp; Include /etc/apache2/conf-library/rewrite-enabling.conf<br>&lt;/VirtualHost&gt;</pre>
-    <p>The above example is pre-modified for DNS Option A above, the
-      greatsite.cakelampvm.com name.&nbsp; Switching all of those to
-      "greatsite.tv" instead would support DNS option B.</p>
-    <p>Copy that file into /etc/apache/available-sites under an appropriate
-      name, which here we will call "greatsite.conf".</p>
-    <p>Tell apache to use the new file:</p>
-    <pre>a2ensite greatsite.conf</pre>
+      for the appropriate host name and "DocumentRoot" path:</p>
+    <pre>&lt;VirtualHost *:80&gt;<br>&nbsp;&nbsp;&nbsp; ServerName excalibur.tv
+&nbsp;&nbsp;&nbsp; DocumentRoot /home/apps/excalibur<br>&nbsp;&nbsp;&nbsp; ErrorLog ${APACHE_LOG_DIR}/excalibur.tv-error.log<br>&nbsp;&nbsp;&nbsp; CustomLog ${APACHE_LOG_DIR}/excalibur.tv-access.log combined<br>&nbsp;&nbsp;&nbsp; Include /etc/apache2/conf-library/basic-options.conf<br>&nbsp;&nbsp;&nbsp; Include /etc/apache2/conf-library/rewrite-enabling.conf<br>&lt;/VirtualHost&gt;</pre>
+    <p>The above example is appropriate for our excalibur app in the
+      excalibur.tv domain (using DNS Option B).&nbsp; Modifying the excalibur.tv
+      references in it (and the path in the DocumentRoot) is sufficient to
+      re-target it for any domain you want.</p>
+    <p>Copy the new site config file into "/etc/apache2/sites-available" with an
+      appropriate file name that includes the site's domain name.&nbsp; We will
+      call our config file "excalibur.tv.conf".&nbsp; If you developed the file
+      in your home folder, this would be the command to move it up to Apache:</p>
+    <pre># sudo cp ~/excalibur.tv.conf /etc/apache2/sites-available</pre>
+    <p>Then tell apache to use the new file:</p>
+    <pre># sudo a2ensite excalibur.tv  # the '.conf' portion of the filename is unnecessary for this command.
+</pre>
     <p>Finally, restart apache to get it to begin serving the site:</p>
-    <pre>sudo service apache2 restart</pre>
+    <pre>sudo service apache2 restart</pre>
     <h3>Test the new web site</h3>
     <p>Given the configuration above, your host PC should now be able to access
-      the new website.</p>
-    <p>To test this, first try pinging the hostname, e.g.: ping
-      greatsite.cakelampvm.com or ping greatsite.tv</p>
-    <p>Then, if there are responses to the ping, it means the DNS is
-      working.&nbsp; If there are no responses, check the instructions in the
-      above DNS option section.</p>
-    <p>Once the DNS is working, one can try browsing to the site at:
-      http://greatsite.cakelampvm.com or http://greatsite.tv (depending on the
-      DNS option chosen).</p>
-    <p>If the site is not showing up properly, try examining the apache logs for
-      error messages that can be corrected.&nbsp; The log files are stored in
-      /var/log/apache2 and are generally named after the website.</p>
+      the new website on the domain "excalibur.tv".</p>
+    <p>To test this, first try pinging the new DNS name:</p>
+    <pre># ping excalibur.tv</pre>
+    <p>If there are responses to the ping *and* the answer is 10.28.42.20, then
+      it means the DNS is working.&nbsp; If there are no responses or it's some
+      other IP address talking back, check the instructions in the above DNS
+      sections.</p>
+    <p>Once the DNS is working, try browsing to the site at "http://excalibur.tv".&nbsp;
+      That should at least bring up the configured site storage path, even if
+      nothing is being served from that folder yet.</p>
+    <p>If the new site is not showing up properly, try examining the apache logs
+      for any error messages that can be corrected.&nbsp; The log files are
+      stored in "/var/log/apache2" and are named after the website (if
+      configured through the above process).</p>
+    <h2>Handy Techniques for Using cakelampvm</h2>
+    <h3>Assorted Guides and Cheat-Sheets</h3>
+    <p>A Cheat sheet for the Vim editor (there are many of these available): <a
+        title="vim commands" href="https://vim.rtorr.com/">https://vim.rtorr.com/</a></p>
+    <p>A git branching model that seems to work well: <a title="release and patch process"
+        href="http://nvie.com/posts/a-successful-git-branching-model/">http://nvie.com/posts/a-successful-git-branching-model/</a></p>
+    <h3>Get the network address on the guest vm</h3>
+    <p>Run this command: ifconfig</p>
+    <p>In the results, look for "inet addr".&nbsp; There may be more than one,
+      if there are multiple network interfaces.</p>
+    <p>The standard IP address is 10.28.42.20 for the cakelampvm.</p>
+    <h3>How to cleanly reboot or shut down the guest VM</h3>
+    <p>When you've got the DNS and everything integrated, these commands will
+      manage the vm's state:</p>
+    <p>First, log into the guest VM:</p>
+    <pre># ssh developer@cakelampvm.com</pre>
+    <p>Then, to reboot the guest VM:</p>
+    <pre># sudo reboot</pre>
+    <p>Or, to halt the guest VM:</p>
+    <pre># sudo shutdown -h now</pre>
+    <p>Using these commands is kinder to the VM than just cycling the power from
+      the Virtualbox control panel.</p>
+    <p><br>
+    </p>
+    <h1>Gritty Details of the Nitty Variety<a id="#nitty-gritty" name="#nitty-gritty"></a></h1>
+    <p>This is the lowest level of plumbing for your VM.&nbsp; Hopefully you
+      will not need to engage with this section.&nbsp; The most useful doc
+      section here is the one below about the "Virtualbox guest additions",
+      which you will probably need at some future point.&nbsp; Oracle releases
+      updates to the guest additions fairly regularly.</p>
     <h2>Configuring the guest VM</h2>
     <p>The guest VM should already be set up appropriately.&nbsp; These steps
       are provided for reference and updates.</p>
-    <h3>Set up virtualbox guest additions for the VM</h3>
-    <p>** note for v001 of cakelampvm: the below steps are still needed on the
-      shipped image.</p>
-    <p>This procedure is needed if the guest provides an older or incompatible
-      version of the guest additions (which have already been installed on the
-      guest vm).&nbsp; It may also be necessary when a new version of the guest
-      additions becomes available.</p>
+    <h3>Set up Virtualbox guest additions for the VM</h3>
+    This procedure is needed if the guest provides an older or incompatible
+    version of the guest additions (which have already been installed on the
+    guest vm).&nbsp; It may also be necessary when a new version of the guest
+    additions becomes available.
     <ol>
       <li>To install the guest additions, open the guest VM and have its window
         in focus.</li>
         Image".&nbsp; This will mount the CD's ISO image on the VM.</li>
       <li>On the guest VM, it may be necessary to mount the CD image that's now
         available:<br>
-        sudo mount /dev/sr0 /media/cdrom</li>
+        <pre># sudo mount /dev/sr0 /media/cdrom</pre>
+        <p>Linux will mention that the device is mounted "read-only".</p>
+      </li>
       <li>Since the VM currently has no windowing system installed, one must
         start the Guest Additions install manually:<br>
-        cd /media/cdrom<br>
-        sudo sh VBoxLinuxAdditions.run</li>
-      <li>This should install the guest additions.</li>
+        <pre># cd /media/cdrom<br># sudo sh VBoxLinuxAdditions.run</pre>
+      </li>
+      <li>The latest Virtualbox guest additions should now be installed.</li>
     </ol>
     <h3>Set up network adapters on guest VM</h3>
     <p>The network interfaces should already be configured on the guest within
-      the virtualbox configuration.&nbsp; This is available by clicking on the
-      VM in the virtualbox manager and selecting "Settings".&nbsp; These are the
+      the Virtualbox configuration.&nbsp; This is available by clicking on the
+      VM in the Virtualbox manager and selecting "Settings".&nbsp; These are the
       configuration settings used:</p>
     Adapter 1:<br>
     &nbsp; Attached to: Host-only Adapter<br>
     <pre>auto enp0s8</pre>
     <pre>iface enp0s8 inet dhcp</pre>
     <p> </p>
-    <h2>Handy Techniques</h2>
-    <h3>Get the network address on the guest vm</h3>
-    <p>Run this command: ifconfig</p>
-    <p>In the results, look for "inet addr".&nbsp; There may be more than one,
-      if there are multiple network interfaces.</p>
-    <h3>How to cleanly reboot or shut down the guest VM</h3>
-    <p>When you've got the DNS and everything integrated, these commands will
-      manage the vm's state:</p>
-    <p>First, log into the guest VM: ssh developer@cakelampvm.com</p>
-    <p>Then, reboot the guest VM: sudo reboot</p>
-    <p>Or, halt the guest VM: sudo shutdown -h now</p>
-    <p>Using these commands is better than just cycling the power from the
-      virtualbox control panel.</p>
     <h2>Notes on building the Cake Lamp VM</h2>
     <p>This is all work that should already have been done.&nbsp; It is
       mentioned here just as breadcrumbs for a future vm builder.</p>
     <ul>
-      <li>Downloaded and installed virtualbox for host computer (where the vm
+      <li>Downloaded and installed Virtualbox for host computer (where the vm
         image will be built).</li>
       <li>Downloaded ubuntu server 16.04 iso.
         (https://www.ubuntu.com/download/server)</li>
-      <li>Created a new vm in virtualbox, telling it to start from the ubuntu
+      <li>Created a new vm in Virtualbox, telling it to start from the ubuntu
         server iso.</li>
       <li>Installed LAMP stack on guest VM.&nbsp; Some help here:
         http://howtoubuntu.org/how-to-install-lamp-on-ubuntu</li>
         https://askubuntu.com/questions/628938/how-to-install-cakephp-in-ubuntu-14-04</li>
       <li>Configured the two network adapters as needed (one for host-only
         network and one for nat network).&nbsp; Here's some info about
-        virtualbox networking with two adapters similar to our setup:
+        Virtualbox networking with two adapters similar to our setup:
 https://askubuntu.com/questions/293816/in-virtualbox-how-do-i-set-up-host-only-virtual-machines-that-can-access-the-in<br>
       </li>
       <li>Installed and configured Samba service for the guest VM.&nbsp; The
@@ -351,5 +523,9 @@ https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%
     </ul>
     <p><br>
     </p>
+    <ul>
+    </ul>
+    <h6> </h6>
+    <p> </p>
   </body>
 </html>
diff --git a/production/sites/cakelampvm.com/rolling/default_page.001/001-default-http.conf b/production/sites/cakelampvm.com/rolling/default_page.001/001-default-http.conf
new file mode 100644 (file)
index 0000000..1360081
--- /dev/null
@@ -0,0 +1,21 @@
+
+
+<Directory "/opt/feistymeow.org/feisty_meow/production/sites/cakelampvm.com">
+  Options +ExecCGI +Indexes +FollowSymLinks +Includes +MultiViews
+  Require all granted
+</Directory>
+
+
+<VirtualHost *:80>
+       ServerName cakelampvm.com
+       ServerAlias www.cakelampvm.com
+       DocumentRoot /opt/feistymeow.org/feisty_meow/production/sites/cakelampvm.com
+       DirectoryIndex vm_index.html
+
+       ServerAdmin developer@localhost
+
+       ErrorLog ${APACHE_LOG_DIR}/error.log
+       CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+</VirtualHost>
+
diff --git a/production/sites/cakelampvm.com/rolling/default_page.001/001-default-ssl.conf b/production/sites/cakelampvm.com/rolling/default_page.001/001-default-ssl.conf
new file mode 100644 (file)
index 0000000..c89b459
--- /dev/null
@@ -0,0 +1,37 @@
+
+
+<Directory "/opt/feistymeow.org/feisty_meow/production/sites/cakelampvm.com">
+  Options +ExecCGI +Indexes +FollowSymLinks +Includes +MultiViews
+  Require all granted
+</Directory>
+
+<VirtualHost *:443>
+       ServerName cakelampvm.com
+       ServerAlias www.cakelampvm.com
+       DocumentRoot /opt/feistymeow.org/feisty_meow/production/sites/cakelampvm.com
+       DirectoryIndex vm_index.html
+
+       ServerAdmin developer@localhost
+
+       ErrorLog ${APACHE_LOG_DIR}/error.log
+       CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+       SSLEngine on
+
+       #   A self-signed (snakeoil) certificate can be created by installing
+       #   the ssl-cert package. See
+       #   /usr/share/doc/apache2/README.Debian.gz for more info.
+       #   If both key and certificate are stored in the same file, only the
+       #   SSLCertificateFile directive is needed.
+       SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
+       SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+
+       <FilesMatch "\.(cgi|shtml|phtml|php)$">
+                       SSLOptions +StdEnvVars
+       </FilesMatch>
+       <Directory /usr/lib/cgi-bin>
+                       SSLOptions +StdEnvVars
+       </Directory>
+
+</VirtualHost>
+
diff --git a/scripts/site_avenger/clean_mapsdemo.sh b/scripts/site_avenger/clean_mapsdemo.sh
new file mode 100644 (file)
index 0000000..5054cdd
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+# some code i wrote to add to revamp that turned out to be unsuitable.
+# but it corrects a problem in cakelampvm v002 release that i find annoying,
+# so here it is as its own file.
+
+# clean out some old files that were not checked in in mapsdemo.
+echo Doing some git repository maintenance in fred account.
+#
+# change over to fred folder
+pushd /home/fred
+test_or_die "changing dir to fred's home; what have you done with fred?"
+
+pushd apps/mapsdemo/avenger5
+test_or_die "changing dir to mapsdemo app"
+
+rpuffer . &>/dev/null
+if [ $? -ne 0 ]; then
+  # it seems our old files are still conflicting this.
+  if [ -f config/config_google.php ]; then
+    \rm -f config/config_google.php
+    test_or_die "removing old config for google"
+  fi
+  if [ -f config/app.php ]; then
+    \rm -f config/app.php
+    test_or_die "removing old config for app"
+  fi
+
+  git reset --hard HEAD
+  test_or_die "resetting git's hard head"
+
+  rpuffer .
+#hmmm: use output saver thing when that exists.
+  test_or_die "puffing out mapsdemo app after inadequate corrective action was taken"
+fi
+
+popd
+
+popd
+#...coolness, if we got to here.
+
+
index d024cd10922782e072c9570d7dbb535fc4e66a77..ea31020f1d2cd4dfcbb28971305940bcc9a90177 100644 (file)
@@ -16,9 +16,19 @@ export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
 
 export NO_HELLO=right
 source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh"
 
 ##############
 
+echo "Regenerating feisty meow loading dock."
+
+reconfigure_feisty_meow
+test_or_die "feisty meow reconfiguration"
+
+##############
+
+echo "Making some important permission changes..."
+
 # fix up the main web storage.
 chown -R www-data:www-data /var/www 
 test_or_die "chown www-data"
@@ -42,6 +52,8 @@ test_or_die "group perms on apache2 and bind"
 # fix perms for fred user.
 chown -R fred:fred /home/fred /home/archives/stuffing 
 test_or_die "chown fred home"
+group_perm $HOME/apps
+test_or_die "group perms on fred's apps"
 harsh_perm /home/fred/.ssh
 test_or_die "harsh_perm setting on fred .ssh"
 chown -R fred:fred /opt/feistymeow.org 
@@ -49,6 +61,8 @@ test_or_die "chown feisty meow to fred"
 group_perm /opt/feistymeow.org 
 test_or_die "group perms on feisty meow"
 
+echo "Done with important permission changes."
+
 ##############
 #
 # some slightly tricky bits start here.  we want to massage the vm into the
@@ -56,6 +70,8 @@ test_or_die "group perms on feisty meow"
 #
 ##############
 
+echo "Updating developer welcome file."
+
 # only update hello if they've still got the file there.  we don't want to
 # keep forcing our hellos at people.
 if [ -f "$HOME/hello.txt" ]; then
@@ -68,29 +84,63 @@ fi
 
 # install a better editor app.
 
-echo "
-The script is about to install the bluefish editor and some dependencies.
+echo " The script is about to install the bluefish editor and some dependencies.
 If the app is not already installed, then this process takes only about a
-minute on a slower home DSL internet connection...
-
-"
+minute on a slower home DSL internet connection..."
 
 apt-get install -y bluefish &> "/tmp/install_bluefish-$(logname).log"
-test_or_continue "failed to install bluefish editor.  not good."
+test_or_continue "installing bluefish editor"
 
 ##############
 
+# deploy any site updates here to the VM's cakelampvm.com site.
+#
+# we want to upgrade the default apache site to the latest, since the new
+# version mirrors the one on the internet (but with green checks instead
+# of red X's) and since we also support https on the new default version.
+# we can do this again later if needed, by upping the numbers on the apache
+# site config files.  our original site was 000 and the new version is 001,
+# which we've done as a prefix on the config for some reason.  makes the
+# code below easy at least.
+if [ -L /etc/apache2/sites-enabled/000-default.conf ]; then
+  # the old site is in place still, so let's update that.
+  echo "Updating default web sites to latest version."
+
+  a2enmod ssl
+  test_or_die "enabling SSL for secure websites"
+
+  restart_apache
+  test_or_die "getting SSL loaded in apache"
+
+  a2dissite 000-default
+  test_or_die "disabling old apache site"
+
+  rm -f /etc/apache2/sites-available/000-default.conf 
+  test_or_die "removing old apache site"
+
+  # copy in our new 000 version (which  
+  cp $FEISTY_MEOW_APEX/production/sites/cakelampvm.com/rolling/default_page.001/* \
+      /etc/apache2/sites-available
+  test_or_die "installing new apache default sites"
+
+  # there should only be ours at this version level and with that prefix.
+  a2ensite 001-*
+  test_or_die "enabling new apache default sites"
+
+  restart_apache
+fi
 
-#hmmm: todo
-# deploy the site updater here to fix the local cakelampvm.com site...
-
+##############
 
 ##############
 
 # sequel--tell them they're great and show the hello again also.
 
-regenerate
+echo "
+
 
+"
+regenerate
 echo "
 
 
index a9a379fd748ad3a5901e8176471ed1d108685181..778b22d57d69733837dd271125e25a1d6c87bf96 100644 (file)
@@ -39,7 +39,7 @@ This script needs to know (1) the application name for the new site and
 appropriate name for a file-system compatible folder name.  There is an
 optional third parameter (3) the path for site storage.  If the site path
 is not provided, we'll use this path:
-  $BASE_APPLICATION_PATH/{app name}/$STORAGE_SUFFIX"
+  $BASE_APPLICATION_PATH/{app name}$STORAGE_SUFFIX"
   exit 1
 fi
 
index 223067f6ce7443b56f2fc929c94613ec55773910..4ab80ed3716e6092650b5e8b8b6c30763a9d9869 100644 (file)
@@ -181,7 +181,7 @@ function restart_bind()
     echo "The bind service did not restart properly.  Please check the error logs."
     exit 1
   fi
-  echo DNS server restarted.
+  echo DNS service restarted.
 }
 
 ############################################################################
@@ -317,6 +317,7 @@ function restart_apache()
     echo "Please consult the apache error logs for more details."
     exit 1
   fi
+  echo Apache2 service restarted.
 }
 
 # sets up the serverpilot storage location for a user hosted web site.