When Your Site’s SSL Works on WiFi but not Cellular

Last night I ran into an interesting error, so I figured I’d make a quick post about what happened to Make Art with Python.

I had an error that kept occurring whenever I’d connect to my site over cellular network in some places.

Each time I’d get an error that Safari couldn’t establish a secure connection.

This was especially frustrating, because whenever I connected via WiFi, I could load my site without any errors at all.

My site was built with Nginx and Letsencrypt on Digital Ocean, so all my certificates should have been up to date and perfect.

It wasn’t until I checked my site using an SSL analyzer that I discovered the problem. My site was refusing connections via IPv6.

Now, that’s especially interesting, because my home ISP doesn’t support IPv6 at all. And it turns out, my cellular provider does in some locations. So anybody trying to access my site over IPv6 wasn’t able to connect at all!

That’s a tough thing to admit, especially after having the site up for almost a month. It seems my default Nginx configuration was missing a directive, with the default Letsencrypt settings for Nginx.

It wasn’t until I added the line:

listen [::]:443 ssl http2 default_server ipv6only=on;

Right after my `listen 443; # managed by Certbot`, that I got IPv6 SSL working. It seems the key directive here was to add the `ssl` in order to have it work properly over IPv6.

This was a great reminder that there can be a lot of edge cases in web applications, and it makes sense to test from multiple devices. I’d enabled IPv6 on my Digital Ocean droplet, but didn’t really have an IPv6 capable computer I could use for testing. Always check before using something new!

Writing a Technical Book in Emacs and Org Mode

I spent the past year writing a book called Make Art with Python. It teaches Python programming through drawing and art, instead of print statements. If that sounds interesting to you, sign up to hear when it’s released here.

Why Write a Book in Emacs?

I needed a distraction free way to write my code and prose in one place. I also needed to track my progress during the writing itself, and settled on using a paper journal and org-pomodoro.

If you’ve ever wanted to write a technical book, the past few months have taught me it’s possible for mortals with day jobs. I’ve just sent my fourth draft off to my editor, and tens of thousands of lines of code and prose have already been written. It’s the first time in my life writing a book has felt achievable.

But there have been painful false starts and mistakes along the way.

In this article I’ll share some basic rules I stole to keep myself focused, motivated, and productive while writing. I’m sharing in the hopes that they will help you too, and you’ll begin writing your book much sooner than it took me.

Most of these ideas and habits are generally applicable, and although they may seem insignificant, improved my writing tremendously. In fact, all the writing and code for my first draft was written while I was the sole backend developer at a startup which grew to millions of users.

I’m a big believer in concrete examples as the only way to learn anything, so I’ll also walk you through the mechanics of the tools I use. We’ll cover the process of writing, file and time management, visualizing the work in progress, exporting, and maintaining a positive attitude to keep the work flowing. Of all these parts, the biggest challenge is mental.

When things get difficult, it’s mostly because you don’t know what to do next. It’s during these times that you need have a routine that happens, no matter what, to get you focused back on writing and making progress.

If you’ve been thinking about writing a book, this guide will hopefully convince you it’s possible.

And best case, soon I’ll be reading your book.

Let’s get started!

Continue reading