March 26, 2020

Programming - DO Server

Cleaning Up syslog

After dealing with rouge logs filling up my server's space, let's clean up syslog.

Starting Fresh

I wanted to clean out what was in there and watch new stuff coming in as I turned off extra logging. I truncated the file with:

truncate -s 0 syslog

Stopping certbot from renewing old domains

I had two domains that were expired and removed from nginx, but I never removed them from certbot.

certbot certificates
lists all the certificates certbot is running. Then to delete a specific one:

certbot delete --cert-name example.xom

Stopping ufw from logging in syslog

It already has it's own log, it doesn't need to be in here too! Go to:

/etc/rsyslog.d/20-ufw.conf
The last line is commented out, uncomment it. This will stop logging in syslog. Then restart the rsyslog service:
service rsyslog restart

Time Spent: 1 hours 23 minutes


February 26, 2020

Programming - DO Server

Moving vaulters to DO

This has been on my to do list for a while but I started getting failing lets encrypt errors and I couldn't manually regen the certificate. Googling the errors shows that you need to upgrade the underlaying versions of things so good enough reason to actually move this.

Steps:

  1. Get new Wordpress on DO
  2. Set up test url
  3. Copy over database and files
  4. Copy over plugins
  5. When parity is there, change DNS
  6. Finally delete the old site!

Time Spent: 6 minutes


January 19, 2020

Programming - DO Server

Server Maintenance

Ran

sudo apt-get update && sudo apt-get dist-upgrade
on both droplets, both completed happily.

Time Spent: 25 minutes


December 20, 2019

Programming - DO Server

Fixing mailgun forwarding

Thought I had set this up correctly but then gmail rejected my test email 2 days later.

Mailgun settings: Need to not use the mg. prefix
All of the other ones have it so not sure what I did there to make it work but this was a quick fix

DO Network: Put in the relevant Mailgun DNS

Mailgun Receiving Routes: need to set one up to forward the email address just set up to gmail

Optional: Sending from the address at gmail: this is where the SMTP settings come into play

Time Spent: 1 hours 53 minutes


December 3, 2019

Programming - DO Server

WordPress Shenanigans 5.6 to 7.2

This isn't technically on DO but my last website on nearlyfreespeech.

Looking at vaulters, it's TLS had expired. It had been warning me nightly but I thought the issue was on nearlyfreespeech's end. I first tried switching servers as vaulters was on an deprecated one. This didn't fix it and also killed PHP 5.6. I went to switch back but the oldest server didn't have 5.6.

To fix the TLS, I went into the CLI and just re-ran the Let's Encyrpt certificate generation. That worked and the TLS was fixed within ~30 seconds.

Now to fix the PHP version issue. The main page would load but the login page had lot's of PHP errors. I had never upgraded the site as the upgrader would always error out on me.

I downloaded a new version of wordpress on CLI and put it in a folder new. I figured I could copy over the site into /new and then switch it over to the live site once it was working. Wordpress installed into /new/wordpress so I was copying the files from /wordpress up into /new. Instead I copied into / , overwriting the original files. D:

Little did I know, this is exactly what I needed to do! It fixed the PHP errors and the login page loaded! I logged in and the menu was chaos but otherwise looked okay. I tried to redo the upgrade to grab the missing files in the Wordpress UI but I kept getting the error. I then tried it from the command line and it told me I was already up to date. Knowing some files were missing, I renamed wp-config folder and copied over everything from /new. That didn't fix the menu. I then did the same steps for wp-includes, and this fixed it!

It does look like all the installed plugins got disabled and the theme lost it's custom options though.

Time Spent: 1 hours 18 minutes


November 11, 2019

Programming - DO Server

everythingelse is being really cachey

This has been going on since at least June. PHP needs to be restarted to get any changes to show up. Database stuff is fine. Wordpress sites have a lot of issues. enstars sever does not have this issue

Some how I had set opcache.validate_timestamps=0 in /etc/php/7.1/fpm/php.ini. I commented that back out to match enstars and actually got an error message on Wordpress!

Next steps:

Time Spent: 3 hours 34 minutes


October 1, 2018

Programming - DO Server

ccmakesthings has been moved!

FINALLY

And it's so much faster!

Time Spent: 3 days 10 hours 19 minutes