Main page 1. Network scanning 2. Knowledge gathering 3. Advice Database browsing
#Title
10The installation and configuration of Nginx server on Debian Linux
11IPv6 configuration of network interfaces and domain name resolution under Suse Linux
12The installation and configuration of Nginx server on RedHat Linux
13The installation and configuration of Lighttpd server on Debian Linux
14The installation and configuration of vsftpd FTP Server under Debian Linux
15The installation and configuration of email client on Redhat Linux
16The installation and configuration of Lighttpd server on RedHat Linux
17The installation and configuration of vsftpd FTP Server under RedHat Linux
18The installation and configuration of proftpd FTP Server under RedHat Linux
19The installation and configuration of proftpd FTP Server under Debian Linux
<<
>>

Advice

The installation and configuration of Nginx server on Red Linux

 
The IPv6 support appears in 0.7.36 version of Nginx server. In case of source code compiltation there is a need of addting --with-ipv6 option.
 
There are 2 ways of installation Nginx server on Linux system. The first one is the installation using distribution repositories and the second is the installation from latest source code from Nginx vendor's website.
Each installation method requires administrator privileges.
During the installation from source code there is a possibility to enable additional modules for compilation.
The installation from repository (special designed packages for specific linux distribution) is prepared by developers of concrete distribution. This kind of installation has enabled some of the additonal modules, is well adjusted for operating system (e.g. directiory hierarchy). But it is not the newest version of the application (Nginx).
 
For Nginx server installation there is a need of enable EPEL Repostiroy (Extra Packages for Enterprise Linux). Do do that read about enabling that repo on your RedHat like distribution of Linux.
 
To install the Nginx server from the repository, enter the following command in the command line:
aptitude install nginx  
 
For proper installation there are required:
  • C++ compilator
  • make utility.
In the beginning there is a need of downloading Nginx server from http://nginx.org/
After downloading the file, unzip it by entering the following command:
tar xvf nginx-VERSION_NUMBER.tar.gz
where VERSION_NUMBER stands for the version of downloaded Nginx Server
 
Enter to the lighttpd-VERSION_NUMBER directory by typing the command:
cd nginx-VERSION_NUMBER/
 
The next step is preparing the configuration files to a compilation. It is done by the following command:
./configure --with-ipv6 –-prefix=PREFIX
where PREFIX is a path where the Lighttpd server should be installed.
 
Then compile the Nginx server by typing the command:
make
 
The last step is a final installation of an application by using the command:
make install 
 
To check if installed version of Nginx server supports IPv6, check compilation parameters (--with-ipv6).  It can be checked by executing the following command in the command line:
nginx -V

Figure 1. Checking if Nginx server supports IPv6
 
If Nginx server was not compiled with this parameter, it should be recompiled.
 
When Nginx server is installed through a repository, configuration files are located in /etc/nginx.
 
When Nginx server is installed through source code, the localiztion of configuration files can be found by a command:
nginx -V
The value after the "--conf-path" describes where is the main configuration file of Nginx server.
 
In both cases for adding, modificating or checking IP addresses, which are used to access a site, there should be viewed the nginx.conf file.
 
The IPv4 adresses, which provide access to sites, are defined by the "server {}" definition and begin with Listen word.
 
The example options for listening of a server on port number 80:
Listen 80; - a website is available on all IPv4 addresses assigned to network interfaces on port number 80
Listen [::]:80; - a website is available on all IP addresses (IPv4 and IPv6) assigned to network interfaces on port number 80
Listen [::]:80 ipv6only=on; - a website is available on all IPv6 addresses assigned to network interfaces on port number 80
Listen 192.168.0.2:80; – a website is available only on IPv4 address 192.168.0.2 on port number 80
Listen [2001:db8::2]:80; – a website is available only on IPv6 address 2001:db8::2 on port number 80
 
If there is an entry for server listening only on IPv4 address, there is a need of adding second entry with IPv6 address in case of listening on both addresses. If server should listen only on IPv6 address, the IPv4 address must be replaced by the IPv6 one.

Figure 2. A sample Nginx server configuration for listening on IPv4 and IPv6 addresses
 
After changing the configuration, there must be a restart of Lighttpd application.
service nginx reload
or
/etc/init.d/nginx reload 
  
To verify that the webserver configuration is proper, type the IPv6 address in square brackets into web browser as shown in Figure 3:

Figure 3. The verification if Nginx is working properly with selected IPv6 address

 

©2012 IIP