Swizec Teller - a geek with a hatswizec.com

Senior Mindset Book

Get promoted, earn a bigger salary, work for top companies

Senior Engineer Mindset cover
Learn more

    Switching from apache to nginx is a dream

    ![A server used for the My Home](https://swizec.com/wp-content/uploads/2009/12/300px-My_Opera_Server.jpg

    Image via Wikipedia

    Since as far back as my memory goes I've been using Apache for my main, primary, and absolutely only webserver. It was the workhorse of everything from dev environments to production machines serving tens of pages.

    But throughout this love affair there was one constant - I had to change things.

    This isn't bad. Of course when you first start using mod_rewrite you're going to have to change things and naturally adding a new website on a new domain means changing a few things. No problem here, all natural.

    But still, there was a certain feeling that rose up in me like a mad urge, a feeling of endless power and proportion, a feeling like, hey, I've had sex with this woman a few times, and I quite like it, but there's something missing something isn't quite right, why can't I watch a good movie instead of having this sex thing?

    That's right, it was the Sense of Impending Doom. Because you see dearies, whenever you have to make a small change in the apache configs a small part of your soul dies. You know it's supposed to be a small change, you know it's supposed to be effortless, but despite having done this countless times, you still waste an hour making everything work.

    This Saturday I finally stomped my foot like a little school girl and said ENOUGH! Then I installed nginx.

    It was a bit daunting at first and I may still not know how to pronounce the name, but I love it. The damn thing is sooper fast and when I had to add a config for a new site ... hah! Took three lines of code, sure it was only for serving static files, but the same thing in apache takes a separate file, then a vhost, then blahlbah. Fuck you!

    Here's an example, come on, would you see anything so sleek and awesome under Apache? Ever?

        server {
                        listen localhost:80;
                        server_name lestat;
    
                        root /var/www;
                        index <a class="zem_slink freebase/en/webserver_directory_index" title="Webserver directory index" rel="wikipedia" href="http://en.wikipedia.org/wiki/Webserver_directory_index">index.html</a>;
                }
    

    Now obviously I don't know how to do fancy rewrites and stuff yet, but from what I've seen so far, I think nginx and Swizec are a match made in heaven for the foreseeable future.

    So there you go @robertbasic, @genom, @loudandwicked, @jaspertandy ... a blog post about the change.

    PS: about versatility and such that @genom mentioned, I haven't a bloody clue (yet)

    PS2: apologies to everyone I mentioned in the post and didn't link to, Zemanta didn't suggest the links and I'm too lazy to do them manually.

    Published on December 14th, 2009 in Apache, intrigues, life, Server, Uncategorized, WWW

    Did you enjoy this article?

    Continue reading about Switching from apache to nginx is a dream

    Semantically similar articles hand-picked by GPT-4

    Senior Mindset Book

    Get promoted, earn a bigger salary, work for top companies

    Learn more

    Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.

    Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.

    Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help 👉 swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.

    Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers 👉 ServerlessHandbook.dev

    Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization

    Want to get my best emails on JavaScript, React, Serverless, Fullstack Web, or Indie Hacking? Check out swizec.com/collections

    Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog

    Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com

    By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️

    Created by Swizec with ❤️