Basic configurations of Nginx installation, reverse proxy, and Server Load balancer In Debian/Ubuntu

Source: Internet
Author: User

Basic configurations of Nginx installation, reverse proxy, and Server Load balancer In Debian/Ubuntu
Install Nginx, reverse proxy, and load balancing In Debian/Ubuntu

Go to the Nginx official website to download the latest stable version, here is the nginx-1.6.3 version.
After the download is complete, decompress the package and enter the directory for execution:

./configure

If your machine is not installedPCERLibrary,zlibLibrary.

sudo apt-get install libpcre3-dev zlibc zlib-bin

Then execute:

sudo makesudo make install

Nginx is installed on/usr/local/nginxDirectory.

Basic configuration of reverse proxy

The default configuration file used by nginx is/user/local/nginx/conf/nginx.conf. If the upstream Server is a JBoss cluster, you canhttpBlock to configure as follows:

upstream jboss {    server localhost:8080;    server xx.xx.xx.xx:port    server server-domain-name}

serverBlock to configure as follows:

location / {    proxy_pass http://jboss;}
Simple ip_hash Configuration

In most cases, if nginx is used as the load-based machine, we all want to deliver the same ip address to the game server on the same server every time. The configuration is as follows:

upstream jboss {    ip_hash;    server localhost:8080;    server xx.xx.xx.xx:port;    server server-domain-name}

In this case, if a JBoss fails to be used, you cannot directly Delete the JBoss address from the preceding configuration. Instead, you must:

upstream jboss {    ip_hash;    server localhost:8080;    server xx.xx.xx.xx:port down;    server server-domain-name;}

Then execute

/usr/local/nginx -s reload

Reload the configuration file.

Deployment of Nginx + MySQL + PHP in CentOS 6.2

Build a WEB server using Nginx

Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5

Performance Tuning for Nginx in CentOS 6.3

Configure Nginx to load the ngx_pagespeed module in CentOS 6.3

Install and configure Nginx + Pcre + php-fpm in CentOS 6.4

Nginx installation and configuration instructions

Nginx log filtering using ngx_log_if does not record specific logs

Nginx details: click here
Nginx: click here

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.