Press "Enter" to skip to content

Must do in nginx configuration

Nginx is widely used web server and best one available around. It is best known for its ability to handle the heavy traffic easily. More importantly, for developers, its configuration seems to be flexible one in compare to Apache or any other servers out there.

Here, in this post we are listing must do activities for configuring nginx servers. Some of these helps us to make our web application faster too.

Gzip support – gzip is a popular data compression program. You can configure Nginx to use gzip to compress files it serves on the fly. Those files are then decompressed by the browsers that support it upon retrieval with no loss whatsoever, but with the benefit of smaller amount of data being transferred between the web server and browser.

Cache resource – Every website has pages, images and other stuff which remains mostly unchanged during the visitor’s session on the site. Almost 30 percent data on the modern day web pages is static, such content should be cached in order to improve performance of Nginx. Caching will give you two benefits.

Disable access log – Nginx logs have too much information coming in them as each and every action is being logged. To improve its performance you can disable these logs and it will eventually save disk space also. Nginx configuration file should contain following parameter if you are looking to disable access logs.

Open file cache – On Linux based operating systems everything is being done using files. Open_file_cache parameter allows the server to cache file descriptors and all the frequently accessed files. You can enable this tweak by adjusting the following parameters.

HTTP2 support – HTTP/2 will make our applications faster, simpler, and more robust—a rare combination—by allowing us to undo many of the HTTP/1.1 workarounds previously done within our applications and address these concerns within the transport layer itself. Even better, it also opens up a number of entirely new opportunities to optimize our applications and improve performance!

HTTPS support: Web has been closing in to HTTPS protocol ditching previous ones. Most of the top websites have migrated already to HTTPS. And for a number of good reasons, this is necessary.


That is it for now.

Everything is awesome.



  1. Sling TV
    Sling TV November 12, 2018

    Hi there! I’m at work surfing around your blog from my new iphone 4!
    Just wanted to say I love reading through your blog and look forward to all your posts!

    Carry on the fantastic work!

  2. Howdy, I think your website might be having browser compatibility issues.
    Whenever I take a look at your web site in Safari, it looks fine however, when opening
    in IE, it has some overlapping issues. I just wanted to provide you with a quick heads up!
    Besides that, excellent website!

  3. Today, I went to the beach with my children. I found a sea
    shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to
    her ear and screamed. There was a hermit crab inside and it pinched her ear.

    She never wants to go back! LoL I know this is entirely off topic but I had to tell

  4. Woah! I’m really enjoying the template/theme of this site.
    It’s simple, yet effective. A lot of times it’s hard to get that
    “perfect balance” between user friendliness and visual appearance.

    I must say you’ve done a amazing job with this. Also,
    the blog loads extremely quick for me on Chrome.
    Excellent Blog!

  5. What i do not realize is in reality how you are not actually a lot more well-appreciated than you might be right now.
    You’re very intelligent. You already know thus considerably relating to this subject,
    made me in my opinion consider it from a lot of numerous angles.
    Its like women and men don’t seem to be interested
    until it’s something to do with Lady gaga! Your individual stuffs
    outstanding. Always take care of it up!

  6. Sling TV
    Sling TV November 14, 2018

    Awesome! Its in fact remarkable article,
    I have got much clear idea on the topic of from this paragraph.

  7. Sling TV
    Sling TV November 15, 2018

    Have you ever thought about including a little bit more than just
    your articles? I mean, what you say is valuable and everything.

    Nevertheless think of if you added some great photos or
    videos to give your posts more, “pop”! Your content is excellent but with
    pics and videos, this blog could certainly be one of the most beneficial
    in its field. Excellent blog!

  8. Sling TV
    Sling TV November 15, 2018

    When I originally commented I appear to have clicked the -Notify me when new comments are added- checkbox and from
    now on every time a comment is added I receive four emails with the
    exact same comment. Is there a means you can remove me from that service?

  9. Sling TV
    Sling TV November 15, 2018

    Its like you read my mind! You seem to know so much
    about this, like you wrote the book in it or something.
    I think that you could do with some pics to drive the message home a bit, but other than that, this is wonderful
    blog. A great read. I’ll certainly be back.

  10. Hello there, just became aware of your blog through Google,
    and found that it is truly informative. I’m gonna watch out for brussels.
    I’ll be grateful if you continue this in future. A lot
    of people will be benefited from your writing.

  11. I do not even know how I ended up here, but I thought this post was great.
    I do not know who you are but definitely you are going to a famous
    blogger if you aren’t already 😉 Cheers!

Leave a Reply

Your email address will not be published.