I cancelled HBO Max

I need to give credit to HBO for making the cancellation process painless. Thank you. What happened is that I went through all the material that I wanted to watch. With nothing in there that I wanted to watch, it didn’t make sense to renew for another year.

If there does appear some show that I really want to watch, I’ll happily sign up again, because the HBO people (web site) is easy to work with.

New Factorio game

I’m going to try Craigthulu’s Malls by Craigthulu.

I’m also going to try Updated 100×100 City Blocks – Snapped to Grid by Hal.

Of course, I will set up belts and pipes within the block. One of the first things to manufacture and load into belts are iron gears. Here’s a starting point:

0eNqlmNGOmzAQRf/Fz7DCxjaGX6miimTdxBIYZKBtFOXfS8JuSbtAZiZPEUk4M74zHny5sH012DY437Piwtyh8R0rvl1Y546+rG7f9efWsoK53tYsYr6sb1dl19l6Xzl/jOvycHLexoJdI+b8u/3NCn6NniL6UPqubUIf723VP9wsrruIWd+73tkpmfvF+bsf6r0NI/0vYxjvCMfQjJ8TJWJt0403Nv4Wd4TFmXxTETuzQqo3NQZ5d8Eepj/o6DOzZujb4ZbDl1hiLd+tSPL/SGKBnCLI6eMaFlgSpYgAKOL8iiCKkjZIEI0gCxQ5Q5CTJ1IblNT8pebLEXlzlCI8oUgCQ6O2p85faUYuULHMS9XgiB07LwummUSgDQ6N2LA6e9L8XKP01i/VNqMkDtPEINAah863n5FbU9LcA4x4NykTGh8fbRniXydrq8Wn07yNf5RdHzvf2dCPv2w9nfRybQWHs9JH1j+ayCXyvEu7uqyq2Fbj34M7xG1T2c3xPvG9dcfTvhnC7TggTJSq3VKYFC198oL0Ei5XgpNLwcn8WVE1VpN5KxE0ycCZz1NsLXODbJp55C41jVjsmByeb4aqYZqQx4DiaN1TTu58SjRB7ilKtBQ/4lQKqpHED7w7eYmlqCPuI1dAt6YaP3FW883wMwaoqsHPACA5p06ENRVkgt//qyxOcIpKQc4UUpAMr5KUU66k+FLgOiTB4QHRFFv6VaCltpOaZK631F8988qM4PiAChmC4wOicwoaJL5KSHab1vqKEwweTCIlCAYPiE5JfpvUn0qS/DaxHBTnCtRMEwwgEE2xrcDNYEjuG1DpXTS9nC0eXgdH7KcN3bROw2WWi8wYo3Murtc/RPQ1AQ==

This is a variation on Stackable Iron Gear Wheel by bonesoul. Since I want this to hang off the main bus and feed gears back in to the bus, I reversed the input feed. It will still tile if I need it to, but this way I don’t have a huge return belt running alongside.

I’m is going to use Basic Science Lab Zone by Diekion.

I still like NRC’s Mining [Ver 1.1.30] by NRC.

Here’s an ammo maker I like:

0eNqlmd1y2jAQhd9F13bG+pe463N0mI4xCmjGlj22aZtmePeK0CGEyrBa7gJB30qrc1Zr+Z1s2oMbRh9msnonvunDRFbf38nkd6FuT9/Nb4MjK+Jn15GChLo7faqnyXWb1odd2dXN3gdXMnIsiA9b95us6LF4iJjHOkxDP87lxrXz1WB2XBfEhdnP3p0n8/Hh7Uc4dBs3Rvr9aRRk6Kc4uA+n2BFYGvoiC/IW/6L6RcZIo2v8x5Re/ejqsYujd/WfOJycJn4TjuWG0+aZcDw7nHwmnFjakEQa2SWQ+Ai0jfzm/AuWQMsLuu3jGvZ13N9t6cPkxjn+PxGgugSIazomkOqCfK2n+S6LfmF9maxIkHVGHqq8PJgMNM1DW3A+rkQJygetLuipq9u2dG38+eibcuhblwpgbwIE53f7TX8YTyamphCmkHSdCkXhCbpaBihBlGWwbSab5wpc60cCpyKbqR4yZUYOVGYOVAZbZ7I1XN0yU90mV93irrqrpK5tRm5kXm5YharbHMSmqFoIYzMUm0E2lXFUoWWgeQsUm4PmLbOP/E8n0a9H/uDd2JyGj/0hbKf7jY1C1V3YPmtU3YWxDaqewdgWVc9AbJ7h2at6A9I+pyg2bN6fnp2G1s8PSzAHMD+9+qvvty6Uzd5Nydnym0xs6vHfE8YtE9fLUlAOJKpuVaC9Uyg2BbE1qm7RdCfBDfxEtssTVSm0zW585HKaUxFEhWknQOoQOPeB1CEYig1Sh+DwlPBMdIYZr9hVWngCZT8DmijKfRaE1gi7GJCWDfrpzKba10LrQttUEyssvjkx+N5EYsxqQLcSNDd1Epk6iXIuSLSSY9Ag0UqUcW3at1JiYG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TS48jkyanMPqkfRAjmG1TJqccOyYNDmFxZAZyPnGhkmToyUMmQHQ6BnoA6CRwTiQI5AMxgHAyFgcAIsIxeAAiojE4ACJCMTgAIiIw+AAhwjD4K444SUqk5zIlHUIESjBAQahMrj7iwnrBLLXB+7NYB4HrtBgkICv12Bcg5szWCgCX63BoqfX2UMBP3hwsoURAq7XQIk1gLs12GQgeMAegw/ctcGmXQHctMHmigHcs8EmuAHcssFm5QF89wZbSgTTCWTrnwDu4WCLtgBu4WArzQC+ooOtvAO4lYMtvAO4k8OWDCa1wPmYDHWf65fvjLtZfD1dXf07Hh9efqD3TRwsNtO8PMwLzt3t9BnTT/s/fvv9dLu/uz3eVU9P/wPuar/F

For science, I started using Tileable Science Production 0.17-1.0 – Early to Mid Game by Christoffer Ramqvist. Unfortunately, the green science using gears has an error, and there is a conflict with both the yellow belt factory and the yellow inserter trying to go on the same side of the belt. So here’s the updated blueprint string:

0eNq1W12P6jYQ/SurPLVSuLWd+CP8gb70rY/V6iqwuWDdkKAk3Ha14r/XwF6gi83OHNSn1SJyZnxmznjsDG/Zot0128F3UzZ/y/yy78Zs/tdbNvpVV7eHz6bXbZPNMz81myzPunpz+K/tV36c/HI2Ln3TLZvZtl5+z/Z55ruX5p9sLvf5pxh+6LvZqqmH2d/rpmmvnlb75zxruslPvjm5c/zn9Wu32yyaIcCfQaah7sZtP0yzRdNOAXzbj+GxvjuYDVAzZ77oPHvN5tp+0cHEix+a5ekL6uDkB2TFQC5ZyAUDWbOQSwayYiFrBnLBQjYMZMFCtmfkcdv6aQqfRTDlT0z3OaKj+2ody9eKgVyxkKVgQFse9EV9u6DXYTX04W8S/I7+8nNh6La7KYvZUixbJcFWv5tSxi4SPdTBqe6m2bLfLHxXT30si6y+Zy9gTEPffl006/qHDwDhqW++DQn5WIldBgqmYw08F9vnfWw5l7pQj2OzWbS+W8029XLtu2am7tad6riesBq/vefLrU2N1KKDtRiYQcAcKYevqsSmbttZ04avD2GF275t7pa3EzVd41frRb87xl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RSxrErNWQv0WJoNCY8YkZMygzd3t4h5v7iK/PCF3dlfDUdyVyP9pJdu2npr0Ip7z00Pzq9/65Flbh0iHz/54v4J9+vN0BfsUvPxtfPrl9wM9x4D+Gr79I/hzctnJ0lbKOudMJdV+/y9Z/vUd

But of course, that necessitates green circuits. Enter Modular Green Circuits by Nilaus.

WordPress copy to test environment

I’m a fan of Tenets of IT

Number 15 of which is “Everyone has a test environment, not everyone is lucky enough to have a separate production environment.”

Heh.

This post will be how I copied a production web site to a test environment.

Prerequisites are:

  • A virtual machine server
  • A domain name
  • A wildcard certificate for that domain name

In my case, for the virtual machine server, I bought a used Lenovo Tiny PC from Amazon, loaded it up with RAM and installed Proxmox on it.

I had bought a domain name, really for my Nextcloud instance, but I can also use it for my home lab.

I have a firewall, which can get SSL certificates from the EFF project Let’s Encrypt, via the certbot / acme protocol. I went through the trouble to get a wildcard certificate, so that any box in my domain name can be SSL protected.

The basic steps

  1. Prepare the new machine
  2. Install WordPress
  3. Export WordPress “production” and import to “test”
  4. .
  5. .
  6. .
  7. Profit!

Prepare new machine

  1. Install Debian
  2. Add vim and other configurations
  3. Change host name and domain
  4. Add ssh key login
  5. Install Apache and MariaDB
  6. Install WordPress
  7. Update Apache enabled sites to include SSL
  8. Update Apache default Debian setting
  9. Install one WordPress plugin to import the export
  10. A note about ASE (Admin Site Enhancements)

Install Debian

This was a Proxmox step, and I think I did it from a .ISO file

Add vim and other configurations

apt-get install vim
update-alternatives --config editor
vim ~/.bash_profile
export EDITOR=vim
[ -r $HOME/.bashrc ] && source $HOME/.bashrc
export PS1="\[\e[32m\][\[\e[m\]\[\e[31m\]\u\[\e[m\]\[\e[33m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]:\[\e[36m\]\w\[\e[m\]\[\e[32m\]]\[\e[m\]\[\e[32;47m\]\\$\[\e[m\] "
vim ~/.bashrc

Find the aliases I want and add them, uncomment them, etc. I always add:

alias ..='cd ..'
vim /etc/inputrc

Find # "\e[5~": history-search-backward and uncomment it

Change host name and domain

I should mention that in my home firewall, it is also my local DNS resolver. So inside there, I have server1.example.com mapped to the IP address Proxmox gave to my new virtual machine (Proxmox got it from my DHCP server).

hostnamectl set-hostname server1.example.com
vim /etc/hosts

In here, I added an entry for 127.0.1.1 which maps the fully qualified host and domain name to the host. So for example, 127.0.1.1 server1.example.com server1

The address 127.0.1.1 is specified because Apache will try to identify the site by name (later). Everything in the 127.x.x.x maps to the local machine, so they all go to the same place. But having it as 127.0.1.1 stops a duplication conflict with 127.0.0.1 for localhost

Add ssh key login

ssh-copy-id root@server1.example.com

Never, in production, would I be commonly logging in as root. But this is a test / play environment, and I find the process cumbersome to set up an alternative user, and then have to be constantly doing a su - (switch user) to root. Since this is in my home lab and not visible on the public Internet, this is not so much a risk. And … before I really try anything screwy, I can take a Proxmox snapshot.

Another thing I run into, is that because I can rip and replace virtual machines easily, I tend to have to delete old entries from the ./ssh/known_hosts file.

ssh-keygen -R "server1"

Install Apache and MariaDB

Essentially, I am following the instructions here at Rose Hosting

One change I make is that immediately after installing MySQL, I run the process to secure the MySQL installation:

mysql_secure_installation

Yes, I set the switch to unix_socket authentication. I have zero need for MySQL to authenticate across a network. This is overkill for a home lab, but since this is how production is going to be set, the machine in test should match it.

Install WordPress

I still follow the instructions at Rose Hosting

Update Apache enabled sites to include SSL

The Rose Hosting instructions don’t disable the 000-default.conf web site

a2dissite 000-default.conf

Now, how to make https:// work? Well, there is already a default-ssl.conf file, so all it really needs is a certificate and key, and for Apache to use SSL. The SSL certificate files mentioned there are /etc/ssl/certs/ssl-cert-snakeoil.pem and /etc/ssl/private/ssl-cert-snakeoil.key

I have exported my wild card certificate and key to my local machine, so now I upload them to those directories, and change the names in the default-ssl.conf file.

Update the ServerName setting in default-ssl.conf to server1.example.com

Update the DocumentRoot setting in default-ssl.conf to /var/www/html/wordpress

Add rewrite rules to the non-SSL site to redirect to the SSL site. In wordpress.conf add:

RewriteEngine On
RewriteCond %{REQUEST_URI} !.well-known/acme-challenge
RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [R=301,L]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
apachectl -t

If this checks out well, that’s nice, but there is still one more thing to add:

a2enmod ssl

Update Apache default Debian setting

This one threw me for a loop – all my redirects were going to 404 error pages.

It turns out that the default setting on Debian has an Apache configuration file with rewrites not allowed.

vim /etc/apache2/apache2.conf

Find my way to the <Directory /var/www/> section. Change the AllowOveride setting from None to All.

The /var/www directory is of course higher up in the directory structure of what Apache is going to serve up. Because it is higher, the AllowOveride None directive overrides the lower level allow all. Whoops – for WordPress this is no bueno.

Finally, restart (not reload) Apache:

systemctl restart apache2

Install one WordPress plugin to import the export

For this, I am following the instructions by Ferdy Korpershoek on this YouTube video

(The YouTube front page has become politicized trash, but for technical videos, it still has good stuff one can find).

Essentially, I install the All-in-One WP Migration plugin on the production web site, do an export, and then install a fixed version of the All-in-One WP Migration plugin on the test web site.

Ferdy does clean up the new / fresh web site first, by deleting and emptying the default pages and posts. I also deleted the default plugins.

After the import is done, I need to log in again, because the database was replaced, which is where my login credentials are stored. After getting logged in, I need to save Permalinks twice.

A note about ASE (Admin and Site Enhancements)

I was almost at hooray! But, I have a small security enhancement via Admin and Site Enhancements (ASE) which threw a tiny wrench in the monkeyworks. Yes, in production, I’ve hidden the login URL to somewhere other than normal. So after the import, All-in-One WP Migration (100 GB version) provides a link to update the Permalinks, but because of ASE, that URL was not found. No biggie, I simply had to use the URL that was appropriate for the production web site.

Profit!

And now I get to bask in the glory of messing the heck out of the test (not production!) WordPress web site. Fun times. 🙂

I think I’ll take a Proxmox snapshot first.