From: Chris Koeritz Date: Fri, 17 Nov 2017 03:13:01 +0000 (-0500) Subject: cleanups and new revision E X-Git-Tag: 2.140.101^2~1^2~8 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=feb581ab0590e2b247f59036e653af1d37c6c94a cleanups and new revision E --- diff --git a/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html b/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html index bf50c20e..561e734a 100644 --- a/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html +++ b/production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html @@ -9,7 +9,7 @@ Configuration and Usage

By Chris Koeritz

Vintage: cakelampvm v002    - Updated: 2017-11-16 (rev D)

+ Updated: 2017-11-16 (rev E)

The cakelampvm project provides a Virtualbox VM that acts as an "internet in a bottle".  The virtual machine provides DNS services (bind9), a Web server (# sudo service bind9 restart

Afterwards, pinging excalibur.tv should work from both the guest and the host.

-

Creating a New Apache site

+

Creating a New Apache Site

First, connect to the cakelampvm via ssh as the developer user, e.g.: ssh developer@cakelampvm.com

Quick approach: Use the feisty meow "add_apache_site" command.

@@ -388,16 +388,17 @@ meow

Manual approach: Edit an Apache config file

Note: the manual approach is not compatible with later use of feisty meow's "remove_apache_site".

-

For Apache, the choice of DNS Option A or B, subdomain or SLD does not +

For Apache, the choice of DNS Option A or B, subdomain or SLD, does not matter.  The site configuration file just has to accurately specify the domain in question.

Start with the following template file for the new website, and modify it - for the appropriate host name:

+ for the appropriate host name and "DocumentRoot" path:

<VirtualHost *:80>
    ServerName excalibur.tv     DocumentRoot /home/apps/excalibur
    ErrorLog ${APACHE_LOG_DIR}/excalibur.tv-error.log
    CustomLog ${APACHE_LOG_DIR}/excalibur.tv-access.log combined
    Include /etc/apache2/conf-library/basic-options.conf
    Include /etc/apache2/conf-library/rewrite-enabling.conf
</VirtualHost>

The above example is appropriate for our excalibur app in the excalibur.tv domain (using DNS Option B).  Modifying the excalibur.tv - references in it is sufficient to retarget it for any domain you want.

+ references in it (and the path in the DocumentRoot) is sufficient to + re-target it for any domain you want.

Copy the new site config file into "/etc/apache2/sites-available" with an appropriate file name that includes the site's domain name.  We will call our config file "excalibur.tv.conf".  If you developed the file @@ -421,38 +422,39 @@ meow That should at least bring up the configured site storage path, even if nothing is being served from that folder yet.

If the new site is not showing up properly, try examining the apache logs - for error messages that can be corrected.  The log files are stored - in "/var/log/apache2" and are named after the website (if configured as - shown above).

-

Handy Techniques

+ for any error messages that can be corrected.  The log files are + stored in "/var/log/apache2" and are named after the website (if + configured through the above process).

+

Handy Techniques for Using cakelampvm

Assorted Guides and Cheat-Sheets

-

Cheat sheet for Vim: https://vim.rtorr.com/

-

Git branching model that seems to work well: A Cheat sheet for the Vim editor (there are many of these available): https://vim.rtorr.com/

+

A git branching model that seems to work well: http://nvie.com/posts/a-successful-git-branching-model/

Get the network address on the guest vm

Run this command: ifconfig

In the results, look for "inet addr".  There may be more than one, if there are multiple network interfaces.

+

The standard IP address is 10.28.42.20 for the cakelampvm.

How to cleanly reboot or shut down the guest VM

When you've got the DNS and everything integrated, these commands will manage the vm's state:

-

First, log into the guest VM: ssh developer@cakelampvm.com

-

Then, reboot the guest VM: sudo reboot

-

Or, halt the guest VM: sudo shutdown -h now

-

Using these commands is better than just cycling the power from the - Virtualbox control panel.

+

First, log into the guest VM:

+
# ssh developer@cakelampvm.com
+

Then, to reboot the guest VM:

+
# sudo reboot
+

Or, to halt the guest VM:

+
# sudo shutdown -h now
+

Using these commands is kinder to the VM than just cycling the power from + the Virtualbox control panel.


-


-

-


-

-

Gritty Details

+

Gritty Details of the Nitty Variety

This is the lowest level of plumbing for your VM.  Hopefully you - will not need to engage with this section.  The most useful area here - is the one below about the "Virtualbox guest additions", which you will - probably need at some future point.  Oracle releases updates to the - guest additions fairly regularly.

+ will not need to engage with this section.  The most useful doc + section here is the one below about the "Virtualbox guest additions", + which you will probably need at some future point.  Oracle releases + updates to the guest additions fairly regularly.

Configuring the guest VM

The guest VM should already be set up appropriately.  These steps are provided for reference and updates.