Jackin up .js with jabber, nginx, jsjac and ejabberd

August 26, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Jackin up .js with jabber, nginx, jsjac and ejabberd:

Lucky for us, bobo already has a copy of Ejabberd running. Ejabberd is an excellent XMPP server written in erlang. Erlang is also excellent. All of this is excellent. But we need one more thing to glue this all together.

Ejabberd implements an extension to XMPP called “BOSH”. Bosh stands for “Bidirectional-streams Over Synchronous HTTP”, and if you want all the gory details, you can read yourself silly right here. Traditional ‘Ajax’ requests are asynchronous by definition, but in our case, we’re going to use jsjac to open an request that doesn’t close right away, or even send data right away.

Install nginx + php + eaccelerator + mysql + ftp + file and memory caching on Ubuntu

August 26, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Install nginx + php + eaccelerator + mysql + ftp + file and memory caching on Ubuntu:

I am designing at the moment a new website. I don’t want to reveal much, but i except this to have much traffic, and there will be a lot of php running in the background, and the site will use a very large database, and a remote API.

So it is very important that i have a light system and use disk cache and even RAM cache for this system.

In one of my servers, i use WHM and Cpanel. WHM by default uses apache. Some of the sites on that server grew very much very quickly. The default apache setup was getting very slow and it was using to much RAM.

Fortunatelly I knew that nginx can be installed as a reverse proxy. I found some guy that could do that to my server. That is how i got introduced to the worlderful nginx. Using nginx and utilizing it’s cache system, you can get a x10 boost in performance. Less RAM less cpu, faster load times. Nginx is wonderful.

Install PHP Server With Nginx, eAccelerator, and Varnish

August 26, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Install PHP Server With Nginx, eAccelerator, and Varnish:

In the word of servers, Apache is still the undisputed king. It’s extendability and ability to run anything you can throw at it has led to it being the number one most used server in the world. Just because it has large numbers though, doesn’t mean it’s the best in terms of performance.

When running a site with lots of traffic, Apache can quickly grow into a large beast. This can be overcome by throwing more machines (and money) at the problem, but for many companies and people, that simply isn’t an option. Instead why not squeeze every piece of performance that you can out of your existing tech.

Enter Nginx. “Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.” In other words, it will run faster and more efficiently than Apache.

Django, Nginx and uWSGI in production

August 26, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you about Django, Nginx and uWSGI in production:

First, some light reading. Check out Simon Westphal’s excellent post “Running Django with Nginx and uWSGI”. This post was the framework for our approach, though we’ve updated some pieces.

Second, the environment. We use (and highly recommend) Rackspace Cloud Servers and Ubuntu 10.04 LTS “Lucid”. These instructions presume you have a working installation of Ubuntu 10.04, a working Django project that you’re currently serving up some other way, and a reasonable knowledge of getting around in a Linux shell.

Toward a million-user long-poll HTTP application – nginx + erlang + mochiweb

August 25, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Toward a million-user long-poll HTTP application – nginx + erlang + mochiweb:

First, this post and title are inspired by the following great article, you absolutely must read if you are interested in the subject:
http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1/
http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-2/
http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-3/

I’m quite far from 1M users, but still getting a load which out-of-the-box configuration can not cope with. What I’m doing is long-poll HTTP server which implements chat and some other real-time notifications for web clients. Nginx is used as a reverse proxy (HTTP router basically). Let’s say we want to handle N connections simultaneously (N should be much bigger than 1000 ). What parameters need to be changed? Note: all numbers are approximate.

Setup nginx, ssl, and virtual hosts

August 25, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you how to Setup nginx, ssl, and virtual hosts:

To install nginx you have a few options depending on the flavour of operating system you are running. You can either install it via a package manager, or download the source and compile it yourself. Using the package manager will mean you will get the latest known stable version for your OS, and have to worry less about working out dependencies or conflicts. However, you may be a version or two behind the official release.

Nginx + Drupal + imagecache + Apache + proxy_pass + 404

August 24, 2011 by admin · Leave a Comment 

Here is a excellent tutorial show you about Nginx + Drupal + imagecache + Apache + proxy_pass + 404:

Here is a workaround to the Drupal imagecache issue with Nginx running as a reverse proxy to Apache. From Drupal, ImageCache is:

ImageCache allows you to setup presets for image processing. If an ImageCache derivative doesn’t exist the web server’s rewrite rules will pass the request to Drupal which in turn hands it off to ImageCache to dynamically generate the file.

So Nginx shouldn’t try to serve static files from this directory unless they exist. Otherwise, it will generate a 404 and images will break. With this fix, we are catching the 404 generated by Nginx on static files. We are then forwarding the request to Apache (proxy_pass) so it processes it correctly. We are also caching all 404s for 1 minute to avoid slamming Apache. Be sure to “fix” all the other 404 errors so Apache does the least amount work. Most of the time, these 404 errors come from missing favicon.ico or non-manipulated images.

Nginx Configuration Examples

August 24, 2011 by admin · Leave a Comment 

Nginx Configuration Examples:

Here are a number of Nginx configurations for common scenarios that should help make things easier to get started with. This page will grow as needed.

Nginx 1.1.1 Released

August 23, 2011 by admin · Leave a Comment 

Nginx 1.1.1 has been released.

Changes with nginx 1.1.1                                         22 Aug 2011

    *) Change: now cache loader processes either as many files as specified
       by “loader_files” parameter or works no more than time specified by
       “loader_threshold” parameter during each iteration.

    *) Change: now SIGWINCH signal works only in deamon mode.

    *) Feature: now shared zones and caches use POSIX semaphores on
       Solaris.
       Thanks to Den Ivanov.

    *) Feature: accept filters are now supported on NetBSD.

    *) Bugfix: nginx could not be build on Linux 3.0.

    *) Bugfix: nginx did not use gzipping in some cases; the bug had
       appeared in 1.1.0.

    *) Bugfix: request body might be incorrectly processed if client used
       pipelining.

    *) Bugfix: in the “request_body_in_single_buf” directive.

    *) Bugfix: in “proxy_set_body” and “proxy_pass_request_body” directives
       if SSL connection to backend was used.

    *) Bugfix: nginx hogged CPU if all servers in an upstream were marked
       as “down”.

    *) Bugfix: a segmentation fault might occur during reconfiguration if
       ssl_session_cache was defined but not used in a previous
       configuration.

    *) Bugfix: a segmentation fault might occur in a worker process if many
       backup servers were used in an upstream.

    *) Bugfix: a segmentation fault might occur in a worker process if
       “fastcgi/scgi/uwsgi_param” directives were used with values starting
       with “HTTP_”; the bug had appeared in 0.8.40.

Download:

nginx-1.1.1   nginx/Windows-1.1.1

Install Django, Nginx, Apache, mod_wsgi, cmemcache

August 21, 2011 by admin · Leave a Comment 

This guide will cover the complete setup of an Ubuntu Intrepid server as well as the software below:

Please note, this guide was written for Ubuntu Intrepid, but will likely work on other versions of Ubuntu barring any software version differences.

Install Summary

Next Page »