Welcome to UltratechHost Forum, Guest. Please take the time to register if you haven't, or click

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[-]
Tags
how to install nginx manually

How to install Nginx Manually
#1
Hello,

Here we will show you how to do nginx installation manually

Step1: Install nginx modules that is fastcgi etc by running
Code:
yum install php-pear-Net-Socket php-pear php-common php-gd php-devel php php-mbstring php-pear-Mail php-cli php-imap php-snmp php-pdo php-xml php-pear-Auth-SASL php-ldap php-pear-Net-SMTP php-mysql


Step2: We need to change the directory by running command
Code:
cd /usr/scr/

Step3: Now we need to download and extract nginx file
Code:
wget http://nginx.org/download/nginx-1.0.8.tar.gz

tar xvzf nginx-1.0.8.tar.gz



Step4: Now we need change the directory to nginx folder by running
Code:
cd nginx-*

Step5: Now we need to configure nginx files bu running command as
Code:
./configure --without-http_rewrite_module --without-http_gzip_module

Step6: Now we need to make it by running command
Code:
make
make install

By default, Nginx will be installed in /usr/local/nginx.

Now stop apache and run nginx by running command as

Code:
service httpd stop
/etc/init.d/nginx start


Nginx Commands


Code:
/etc/init.d/nginx restart
/etc/init.d/nginx start
/etc/init.d/nginx stop
/etc/init.d/nginx status

Nginx Change Server Header
Code:
nano src/core/nginx.h

find lines:

PHP Code:
#define NGINX_VERSION    "1.0.8"
#define NGINX_VER        "nginx/" NGINX_VERSION 

to

PHP Code:
#define NGINX_VERSION    "1.0.8"
#define NGINX_VER        "myname/" NGINX_VERSION 

If Above hack doesn’t work here’s the good one:
edit src/http/ngx_http_header_filter_module.c

Code:
nano src/http/ngx_http_header_filter_module.c

around line 48, changing the following line to something like:

PHP Code:
static char ngx_http_server_string[] = "Server: yourserver" CRLF;
static 
char ngx_http_server_full_string[] = "Server: yourserver" CRLF


Referense:
1. Nginx Offcial Installation Document

2. How to install and configure nginx
(This post was last modified: 10-12-2011, 08:01 AM by UltratechHost.)


Dinesh Kumar Mohanty
Ultra Web Solutions®
Bhubaneswar, Odisha, India.

UltratechHost - Your One Stop Offshore & Onshore Hosting Provider
Server Locations : Netherlands, Germany, Russia, Singapore & USA
Service Offers: Shared hosting | Reseller hosting | Cloud server | Dedicated server | VPS Hosting



Forum Jump:


Users browsing this thread: 1 Guest(s)