Swizec Teller - a geek with a hatswizec.com

    Switching from apache to nginx is a dream

    • A server used for the My Home

      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 manugally.

    Reblog this post [with Zemanta]

    Did you enjoy this article?

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

    Learned something new?
    Want to become an expert?

    Here's how it works 👇

    Leave your email and I'll send you thoughtfully written emails every week about React, JavaScript, and your career. Lessons learned over 20 years in the industry working with companies ranging from tiny startups to Fortune5 behemoths.

    Join Swizec's Newsletter

    And get thoughtful letters 💌 on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.

    "Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. 👌"

    ~ Ashish Kumar

    Join over 14,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. ✌️

    Have a burning question that you think I can answer? I don't have all of the answers, but I have some! Hit me up on twitter or book a 30min ama for in-depth help.

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

    Curious about Serverless and the modern backend? Check out Serverless Handbook, modern backend for the frontend engineer.

    Ready to learn how it all fits together and build a modern webapp from scratch? Learn how to launch a webapp and make your first 💰 on the side with ServerlessReact.Dev

    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 ❤️