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 installedPCER
Library,zlib
Library.
sudo apt-get install libpcre3-dev zlibc zlib-bin
Then execute:
sudo makesudo make install
Nginx is installed on/usr/local/nginx
Directory.
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 canhttp
Block to configure as follows:
upstream jboss { server localhost:8080; server xx.xx.xx.xx:port server server-domain-name}
server
Block 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: