Nginx

From KevinWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with "= Nginx = [http://nginx.org NginX] is a lightweight open source Web server . == Installation == $ sudo apt-get install nginx")
Line 4: Line 4:
== Installation ==
== Installation ==
  $ sudo apt-get install nginx
  $ sudo apt-get install nginx
 +
 +
== Configuration ==
 +
 +
=== Remove Server Info ===
 +
==== Version ====
 +
Modify <code>/etc/nginx/nginx.conf</code>
 +
  server_tokens off;
 +
 +
==== Server Info in Response Header ====
 +
* Remove server info in the response header
 +
Install extra modules for changing header
 +
$ sudo apt-get install nginx-extras
 +
* Add the following line to the http block in the <code>/etc/nginx/nginx.conf</code>.
 +
  more_set_headers 'Server: server';
 +
 +
 +
== PHP ==
 +
$ sudo apt-get install php5-fpm

Revision as of 05:06, 31 December 2012

Contents

Nginx

NginX is a lightweight open source Web server .

Installation

$ sudo apt-get install nginx

Configuration

Remove Server Info

Version

Modify /etc/nginx/nginx.conf

  server_tokens off;

Server Info in Response Header

  • Remove server info in the response header

Install extra modules for changing header

$ sudo apt-get install nginx-extras 
  • Add the following line to the http block in the /etc/nginx/nginx.conf.
  more_set_headers 'Server: server';


PHP

$ sudo apt-get install php5-fpm
Personal tools