How to, uh, update your blog

  1. Remember the domain name you picked 10 months ago.
  2. Type the domain name into the nav bar of preferred browser.
  3. Get a 404 that looks familiar. Okay, nginx is working, server is still up. Great, so what gives.
  4. Maybe let’s try logging in to the server that’s supposed to be running this page. What was that server again?
  5. Log into the web portal where you have a handful of boxes running things that you can’t remember. Which one of these is running the website?
  6. Check the DNS section of the web portal, note down the IP address corresponding to the A/AAAA records.
  7. Go back to look at that handful of boxes again. Find the box of interest. Try logging in to the box.
  8. Login works, we even have an ssh alias set up, thanks previous self.
  9. Poke around a bit, directories look right, nginx conf looks solid.
  10. Think a bit.
  11. Try remembered domain name prepended with https i.e. https://{domain}
  12. Success, things look right. What happens if we try https://www.{domain}?.

No Style

Huh. Looks wrong. Whats up with that? It’s like I’ve got no, style, or something.

  1. Open up the inspector to see if it has anything to say.
  2. Well that’s a suspicious looking exclamation point.
A screencap of the browser inspector showing an exclamation point and a message about not being able to load my css stylesheet because of CORS

suspect exclamation

  1. Looks like the stylesheet won’t load because of CORS. Hmmm…
  2. Recall that there’s something in the static site generator conf about a base url or something.
  3. Change the base_url to https://www.{domain}. That works, but now without the www doesn’t, same deal,no CORS allowed.
  4. Try something off the internet with .htaccess file
  5. Learn that nginx doesn’t support .htaccess. Great….
  6. Mess with the nginx config trying to get CORS to work, no luck.
  7. Move some redirects around in the nginx config. End up with a circular redirect loop.
  8. Experiment, eventually get the redirects right after understanding a bit better how the nginx config works with multiple ‘servers’ handling http and https separately; redirecting www or http -> https. Ended up needing to add a redirect in the https server to redirect https://www -> https://{domain}