work in progress
clear contents of appresources.dll
Documenting my journey experiencing new technologies and life
work in progress
clear contents of appresources.dll
Upgraded Windows Server 2019 to Server 2022 today. I RDP’ed in and mounted iso and setup from within windows. It downloads some updates and performs some installation steps within windows. Took 10-20 minutes to get to 100% then you have to click a button for it to restart. At that point the RDP session terminates obviously. Plug in monitor and keyboard. The restart takes quite a while with nothing on the screen. Eventually windows logon screen is showed and you set up the country etc.
Evaluation Version doesn’t support in place upgrades
The option to keep files/settings is greyed out when upgrading from Windows Server 2019 Eval to Windows Server 2022 Eval.
The only option available is to keep nothing.
To do in place upgrades while retaining files/settings, you must have a fully licensed Windows Server.
Set Computer Name and DNS suffix
Set timezone
Set IP address
Install Hyper V Manager
Setup vswitch VLAN ID
Set static IP and default gateway on vswitch nic
Default gateway was prefilled/greyed out but going in a second time shows a blank default gateway.
Allow Core Network Diagonistics in Firewall to enable ping echos
Edit rule to specify which subnets to respond to, by default it’s only local subnet
Enable RDP
Allow Remote Connections to this computer
Install BOINC
Exit BOINC
Copy boinc data folder contents to c:\programdata\boinc
Restart BOINC
Do sychronization
Confirm tasks and host list
Wrote a quick script to make a copy of files + db
#!/bin/bash
cd /srv/www/wordpress
tar -zcvf ~/backup-$(date +"%Y%m%d").tar.gz *
cd
ls backup-*
sudo mysqldump -u root --password="<insert password>" wordpress > ./mysql-$(date +"%Y%m%d").backup
ls mysql-*
The WordPress healthcheck was complaining about REST API and curl error 7. I narrowed it down to a SSL problem based on the error msgs complaining about no response on port 443. Weird as I didn’t have this problem yesterday.
Despite setting up my DNS with cloudflare and having traffic proxied under their SSL tunnel, it is not a true SSL connection. I figured this out when I “curl https://localhost” or “curl https://adrianng.com” and it said connection refused. (The cloudflare proxy only encrypts the traffic between the client’s browser and cloudflare’s server. The traffic between cloudflare and my web server was still unencrypted.)
I ended up using cerbot / letsencrypt to install a SSL certificate on this web server:
sudo snap install core; sudo snap refresh core
sudo snap install –classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot –apache
This successfully setup a certificate on the server and the site was SSL enabled. “curl https://adrianng.com” proved this as now I get a proper response. However on the web browser, I was getting too many redirects.
To fix this, I went into my cloudflare dashboard, SSL/TLS and found this screen:

Changing it from Flexible to Full (or even Full strict) made it work again.
Continuing from the previous post about migrating this site to an Azure VM… I noticed the the site’s performance was horrendous on the free B1s VM size 1CPU 1GB.
I increased the VM size to B1MS 1CPU 2GB which takes me out of the free tier but so far it seems to work. But in the interest of going back to free tier, I’m going to want to go back to the 1GB VM size. I’ll need to look into this some more.
So it turns out the Azure Ubuntu VM by default doesn’t have a swap file. This appears to be the reason why the VM bogs down and runs out of memory. I checked the site this morning and it wasn’t responsive at all. Azure portal showed it had 35Mb of RAM free.
So I just created a swap file and rebooted. Let’s see if this works. So far so good.
Create 2GB file in root directory called swapfile:
sudo dd if=/dev/zero of=/swapfile bs=1M count=2048 status=progress
Give only system permission:
sudo chmod 600 /swapfile
Make it a swap file:
sudo mkswap /swapfile
Turn on swap file:
sudo swapon /swapfile
Make persistent by editing /etc/fstab and adding swapfile entry:
sudo nano /etc/fstab
“/swapfile none swap 0 0”
Reboot:
sudo reboot
Cisco really came in to save the day here with certifications expiring in August. Normally you have to pay for a subscription to Cisco U to get access to Continuing Education credits to recertify Cisco certifications. End of June they announced this program that’s good thru August 31 where it’s free to get up to 56 credits by completing three courses.
I only needed 32 credits to recertify my CCNA so I completed the Cisco Secure Network Analytics and Cisco Secure Cloud Analytics course… plus the Network Automation course which covered Python, APIs, Ansible, DevOps, Git. I actually learned a lot and it helped me improve my understanding of infrastructure automation. Took about 8 days of 4-8 hour sessions.
This gives me much more time to prepare for my CCNP instead of the rapidly approaching expiration date of Aug 23, 2023 for my CCNA. Now my CCNA is good until 2026 and I really should start my CCNP after I get a couple of AWS and Azure SA certs this season.
Will update this as I go, may need a separate one for boinc.
runcmd:
– sudo apt update && sudo apt -y upgrade
– sudo timedatectl set-timezone America/Toronto
– sudo hostnamectl hostname <hostname>
– sudo ufw allow ssh
– sudo ufw enable
– sudo reboot
Just migrated this blog from a cPanel VPS provider to my own Azure VM running on Ubuntu/Apache/MySQL. If you’re seeing this, then the migration worked!
Followed these instructions to install apache, wordpress, and mysql. https://ubuntu.com/tutorials/install-and-configure-wordpress#1-overview
Followed the Site Health and updated chmod 444 for .htaccess and wp-config.php from 666 and 644 respectively.
Originally tried migrating the content using Migrate Guru Plugin since it seemed easier, but it failed.
Finally migrated the content using All in One WP Migration Plugin.
Upon completion I deactivated the All in One WP Migration Plugin and immediate lost access to admin panel. Had to add some lines of code to the wp-config.php file above the require once call
if (isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’) $_SERVER[‘HTTPS’] = ‘on’;
Surprisingly the performance has been horrendous on a B1s so I just upgraded to B1ms. I suspect there’s some mysql tuning that needs to take place to prevent it from hogging over 50% of system memory. Will leave it at 2GB ram for now and come back to this later.
Just encountered this and the solution is simple.
Clicked on new post and it just loaded and eventually black screened. Thought it was another ad block issue but a quick google search showed the fix.
Settings
Permalink
Save Changes (without making any changes)
Clicked on new post and made a new post!
When you click on the photos on this site, it opens a photo gallery where you can click left/right to move between photos, but the x to close the gallery to return to the article doesn’t work. Nothing happens when you tap the x.
Turns out my pihole DNS ad blocker was the culprit. I determined this because the site works fine when pihole is disabled or I bypass my network (LTE).
After many hours of troubleshooting, and with the help of my dev friend doing some Chrome dev tracing, it turns out the close button program is hidden in the ad that loads above the photo gallery. So if the ad is blocked then so is the function to close the gallery.
To fix this I had to whitelist the following domains on my DNS server:
www.googletagservices.com
securepubads.g.doubleclick.net
This does enable some ads but at least the site works again.
Update: the whitelist no longer works, had to update the whitelist to *.googletagservices.com instead of just www.googletagservices.com, even though logs on the DNS server was showing it was blocking www.googletagservices.com.