New book : Nginx web server cookbook

May 31st, 2011 § 0 comments § permalink

Nginx web server cookbook

Nginx web server cookbookGuys after a long break, I have come out of my slumber to talk about my first publication with Packt publishing. In short the book is about tips and tricks around the upcoming Nginx web server. You can check it out using this link. This has been published by Packt publishing, a UK based technical publishing house.

It would not have been possible without the tremendous support of the people around me, and in specific the many people I have worked with. I will keep adding more stuff around the book on my blog going ahead.

Nginx 1 Web Server Implementation Cookbook

This is a cookbook full of illustrations and diagrams to help you implement your web needs with Nginx, with a focus on practical examples. If you are tired of Apache consuming all your server memory with little traffic and to overcome this, or for some other reason, you are looking for a high-performance load-balancing proxy server and have tried using Nginx, then this book is for you. You need some basic knowledge of Nginx. System administrators and web developers will benefit greatly from this book.

Jailed in FreeBSD

March 8th, 2010 § 2 comments § permalink

Well, working on freeBSD right now some immediate learnings for most linux users

  • Ports is as good as apt-get [and i would say much better, when i started installing stuff]
  • You will need to start with installing vim and bash to make your life a lot easier

So the target was to install python and nginx, both of which are very easy to install once you understand how the whole ports collection system works. So here is the guide to installing nginx

portsnap fetch – This gets the portsnap collection file

portsnap update – This updates the collection directory at /usr/ports

Then goto /usr/ports/www/nginx and use make, it throws up a very nice module selection menu which i really like. I do wish that apt-get was like this when it came to installing stuff like this. The final step is a make install Simple is it not.

Python is very similar when you want to install as well ! More as i finish my installation and tweaking, having some issues with nginx latency !

Nginx upload module – efficient uploads

August 20th, 2009 § 0 comments § permalink

I was just having a look at some forums and saw some people talking about how to handle large parallel uploads. I have been having a look at this plugin which comes with NGINX and played around with it. Extremely useful if you use nginx in your stack and are getting killed by massive uploads.

Have fun!!

http://www.grid.net.ru/nginx/upload.en.html

Nginx + django fcgi lessons

January 19th, 2009 § 2 comments § permalink

Today was a good day as i learned some valuable lessons about django and nginx.

  1. ALWAYS close the database cursor in django, it can lead to some pretty wierd memory issues going forward.
  2. FIND the most optimal number of database connections you initialize for you connection pooling. This will let you optimize on memory going forward.
  3. ENSURE that you do not set a very high client_timeout, this means that if connections are not explicitly not closed by the client then the web server will not timeout. This results in bad memory behavior for the fcgi threads.

Well, this has solved my major issues with respect to kwippy. Also learned that GIFs are very fundamentally different than JPEGs which results in a lot of problem when used in the python imaging library. All in all a good day :D .

PHP + nice URLS + nginx

December 26th, 2008 § 0 comments § permalink

Easiest way to get php with good looking urls running on your site . Works for drupal, wordpress and joomla.

server {
listen 80;
server_name www.domain.com;
index index.html index.htm index.php;
root /path/to/domain/files;
location / {
error_page 404 = //e/index.php?q=$uri;
}
location ~ .php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /path/to/domain/files$fastcgi_script_name;
}
access_log /usr/local/nginx/logs/domain.access_log;
error_log /usr/local/nginx/logs/domain.error_log;
}