Nginx or so-called engine x is one of the open source HTTP servers that is free to use for all the new and professional. Nginx itself is known as the source with the stability and rich features, and also has common configuration is simple. In addition, Nginx only consumes resources are low enough that more of those users who choose to use Nginx instead of apache. Why is that? Because although apache offers all the convenience it has, Nginx still has the main advantages of resource consumption when in use. Amazing is not it?
But, despite that there are still many beginners who do not know Nginx and how to install and configure. Most of those who start trying to use Nginx also want more to know how to install it on their favorite servers such as ubuntu Linux, CentOS, and others. And on this occasion, I will share a little knowledge I already know about installing and configuring the web server Nginx in ubuntu 12.04, and presenting it in the form of little screenshot images that can assist you when doing so. Not only that but this installation also with PHP5 and MySQL support.
Okay, let’s get started!
Step one we have to do is fix first ubuntu repositories with a command like this:
Step two after the repository is ready and we can proceed with installing the package Nginx in the following way:
The command is not much different, except that above statements are steps to incorporate the installation dependencies.
Step three after the installation process is complete it can start using Nginx services in the following way:
Next we can go directly to an IP address in the browser we use to see a welcome page Nginx has now appeared there, continue to the next step.
Step four install MySQL, and for this step, you can see in a different article.
Step five we also need to install PHP packages for Nginx that can process the PHP file through the command PHP-fpm or mean (FastCGI Process Manager) and we also need to issue the following command: ~ $sudo apt-get install php5-fpm php5-mysql php5-xcache
Step six we'll start doing the configuration to complete with test Nginx server via a simple configuration. You can follow these steps one by one and create a file (index.php) which we then paste the code below before saving.
And this configuration will refer to port 8080 with root directory path/usr/share/nginx/www/test like where we made earlier index.php file.
Step seven would appear command to enable the virtual sites such as the following:
Step eight is starting a service restart Nginx before use with this command:
Step nine is the last stage after activating the service Nginx and we need to test this work by opening IP server on port 8080 follow as the following example: HTTP: //192.168.1.1: 8080 and you can see info PHP as follows.
You can also create other virtual sites and conduct trials on the configuration explained. But do not forget that this is just a test and do not apply directly to the live server.
So now you will start using Nginx with nine easy steps to install and configure it to be used. Five reasons why you must use Nginx is Nginx architecture is superior to apache for event-based, and I have explained the early section of this article. In addition, because its performance is dogged as fixed faster though many who access at the same time. Not only that, its steady and complete was also the reason for using Nginx.
But make no mistake if this Nginx supplement daily needs, full-featured and not just part of it is used by many people but all the features it provides will be needed for the most searched. Nginx also provides facilities which became one of the advantages compared to apache. When you configure Nginx was obviously much simpler because it has many tools that can be used to simplify installation, optimization, and service of heavy traffic.
Well, if we talk about the popularity and number of users it is clear more that use apache instead of Nginx. Apache already dominates the Internet world since 2009 and in a short time, hundreds of millions of websites using apache as a server. Contrast to the early emergence Nginx indirectly received by it from the users. But that does not mean the position Nginx will not be able to shift the popularity apache, as time passes and everyone will start to switch to using a web server that is faster overcoming heavy traffic on the website. Maybe if you start thinking of using Nginx, now is the time to try to install and configure it as a test run before you actually switch. I'm very interested in the advantages of this web server with all the conveniences. So, I did not hesitate to use.
If you need help and questions about the installation and configuration of web server Nginx in ubuntu 12:04 then I will be happy to assist you with answers in the comments. So stay connected with our website and leave a comment to your question. Do not worry, I read them all. But do not forget to read the article continued from any part of a separate article will you need to complete the trial in this case.