Login Register




The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


Installing Nginx on Linux & Windows filter_list
Author
Message
Installing Nginx on Linux & Windows #1
[Image: nginx.jpg]

Nginx is an open source, free high performance HTTP server and reverse proxy, as well as an IMAP / POP3 proxy server. Igor Sysoev started the development of Nginx in 2002, with the first public version in 2004. Nginx now receives almost 12.18% (22.2M) active sites in
all domains. Nginx is known for its high performance, stability, rich feature set, simple configuration and low resource consumption.

Installation:

To begin with the installation, first we must install a dependency:

Code:
# apt-get install build-essential libssl-dev libpcre3-dev

Installing the library we can begin with the installation in full nginx,

Download:

Code:
wget http://nginx.org/download/nginx-1.2.6.tar.gz

We Unpack it:

Code:
tar zxvf nginx-1.2.6.tar.gz

We enter the directory: cd nginx-1.2.6

And we compile:

Code:
- ./configure - make - make install

(remember to enter as root or sudo)

Nginx has several modules available, which can be downloaded here: http://wiki.nginx.org/Modules

In order to start, restart and stop our nginx, we need a script, download it :

Code:
- wget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx - sudo mv nginx /etc/init.d/nginx - sudo chmod +x /etc/init.d/nginx - sudo chown root:root /etc/init.d/nginx

now we can start it correctly:

Code:
/etc/init.d/nginx start [ ok ] Starting Nginx Server...:.

Installing php5-fpm:
we run:

Code:
apt-get install php5-fpmv

We add the following key:

Code:
- apt-get update - wget http://www.dotdeb.org/dotdeb.gpg - cat dotdeb.gpg | sudo apt-key add -

And we can install php:

Code:
- apt-get install php5-cli php5-suhosin php5-fpm php5-cgi php5-mysql

We started it

Code:
- /etc/init.d/php5-fpm start

After that in: /etc/nginx/nginx.conf , we will make the following changes:

We look for the line that says:

Code:
index                       index.php index.html index.htm;

And we will give priority to index.php as seen in the example, then the block

Code:
" upstream php " que apunta a PHP-FPM. upstream php { server 127.0.0.1:9000;

And to the last of the file we will add the following:

Code:
location ~ \.php$ {               include fastcgi_params;               fastcgi_index index.php;               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                              fastcgi_pass php;

Then we will add the following to the end of the file: / usr / local / nginx / fastcgi_params

Code:
fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on;

And restart our nginx: service nginx restart

Instalación en Windows:

[Image: images.jpg]

Download: http://www.mediafire.com/download/kzx7jj...-setup.exe

Well typical of Windows, we just have to give next, next, next ...,

[Image: SU565f0.jpg]

In this part we will choose to install, since we can install
mysql, phpmyadmin, php, etc.

[Image: 8850a71ce0.png]

And good on our C disk, we will have ready everything installed simple, in the folder are the Start, Stop and the Hosteditor, which will serve to put our ip publishes:

[Image: AdQ2PIB.png]

To the last one I see my ip added, and the name of the container folder
"zangetsu" and ready, we will have our server running correctly,

To enter phpmyadmin, we will go to the address http://127.0.0.1:81/ , with the
user by default "root" and we will be able to administer it correctly,

Regards!
[Image: Vs4P58c.png]

Reply

RE: Installing Nginx on Linux & Windows #2
I wish easy to follow and well documented tutorials (like this), were also available on most sources on the net.

Well done.
[Image: AD83g1A.png]

Reply

RE: Installing Nginx on Linux & Windows #3
A very nice, detailed tutorial which will be a lot of help for members that are trying to setup their website. Thank you for sharing this with us.
~~ Might be back? ~~

Reply

RE: Installing Nginx on Linux & Windows #4
Thank you my bro for sharing your knowledge with us, keep it up
Die  But Don't Lie
“Oh Abu Dharr! Don’t look at the smallness of the sin but look at the one you disobeyed.” Prophet Muhammad (pbuh)
[Image: p_237m2jx1.png]
Click for Free VPN

Reply