How I was driven crazy by an nginx update

More Linux, less sleep

I'm writing a project with Redis recently. So last night I decided to install it on my server.

If you're familiar with Linux, you probably know that it's recommended to sudo apt-get update before installing new packages(I'm using Debian). However, after updating, it seemed tempting to upgrade all my packages by the way. After all, what could go wrong?

So I executed sudo apt-get upgrade and took a shower. When I returned I saw an error message:

nginx depends on nginx-full (>= 1.6.2-5+deb8u1) | nginx-light (>= 1.6.2-5+deb8u1) | nginx-extras (>= 1.6.2-5+deb8u1); however:
 Package nginx-full is not configured yet.
 Package nginx-light is not installed.
 Package nginx-extras is not installed.

Well, that's no big deal. So I proceeded with sudo apt-get nginx-full nginx-light nginx-extras. Now the error message changed: nginx-full depends on nginx(>= 1.6.2-5+deb8u1).... It seems that I've gone through a whole circle.

I turned to the good ol' StackOverflow and got an answer:

If only I had the patience to finish it...

I immediately followed its first instruction, purged and reinstalled nginx. And... Boom! My site was down. Even more horrible, all my configuration files were gone. Now that's getting really serious.

I don't want to remember how I rewrote all those files from memory. After my homepage finally back to normal, I found that MySQL was still not working: It insisted that the root password field was something like "*F12Y876YUUV...", despite I didn't set any root password at all - or at least I remembered so,

Since I haven't start to migrate to MySQL yet, I simply deleted it and installed it again. However, the configuration still refused to gone. I tried several times and have to delete all its files manually.

So why the hell I lost all my config of nginx when reinstalling it but not so when I did the same to MySQL? (Actually I know the technical reason behind it. I'm just getting really frustrated.)

Do you think that's the end? Absolutely not. My Angular project kept failing when refreshing for no reason. After numerous restarting and logging (just look at the title image!), I found out that the try_file had a side effect on index directives, which I'll later write another article to describe.

And when it's all set, it's already 5 AM...

After all, though still full of bugs and lack of most critical functions, at least my new Angular project is available now. If you really cruel enough that doesn't care about my sleep and health at all are curious, you can try it here now.


(PS: After all of these, I still find some minor bugs 30 minutes later and used JuiceSSH from my phone to fix them up, since I was too tired to even open my laptop again. At this rate I'd almost certainly die before 30...)

Leave your comment

кино го  

Greetings from Los angeles! I'm bored to tears at work so I decided to browse your blog on my iphone during lunch break.

I really like the info you present here and can't wait to take a look when I get home. I'm surprised at how quick your blog loaded on my cell phone .. I'm not even using WIFI, just 3G .. Anyhow, wonderful site!