(3) deployment of the Linux environment (Centos + Nginx + Tomcat + Mysql)-deployment of the Nginx Environment
In my local testing practice, the following is a complete operating document for Centos + Nginx + Tomcat + Mysql on Linux. The record is as follows, we hope to give a systematic reference to programmers who want to build a Linux environment systematicall
Tags: Linux NginxNginx Series -1.linux Installation Nginx catalogue-Nginx Series
Nginx Series -1.linux installation NginxNginx Series-2. Configuring the Lnmp (Linux, Nginx, MySQL, PHP) architectureNginx Series-3. Configuring Nginx Virtual HostNginx Series -4.
This article mainly introduces the detailed Nginx anti-theft chain and Nginx access control and Nginx parsing PHP configuration of the relevant information, here to provide examples to help everyone, learn to understand this part of the content, the need for friends can refer to the next
Detailed Nginx anti-theft chai
Next year will look for a job, look at the classic Open source project-nginx, the Library borrowed a The first is the Nginx environment configuration relatedReference post: Nginx Module development---Linux using Eclipse compilation, debugging Nginx article 5:linux using Eclipse for
: This article mainly introduces [nginx] the most comprehensive nginx tutorial on the Internet (nearly 100 articles). If you are interested in PHP tutorials, refer to it. Nginx basics
1. nginx installation
2. nginx compilation parameters
3.
First of all, http://nginx.org/download/download a version of the Nginx package that you need. Download using wget
If you need to redirect the installation of the corresponding package
Yum-y Install pcre*wget http://nginx.org/download/nginx-1.7.8.tar.gzAfter the download is complete, unpack the corresponding package.TAR-ZXVF nginx-1.7.8.tar.gz
Switch
1. Overview (skip Part 1)
Nginx helps us achieve smooth upgrade. The principle is as follows:
(1) Start a new process without stopping the old process.
(2) The old process is responsible for processing requests that are still not processed, but will not accept the requests.
(3) The new process accepts new requests.
(4) After the old process processes all requests and closes all connections, it stops.
This facilitates smooth upgrade. Generally, you n
Node development phase, generally used
httpModule to start a local server, easy to debug.
It's probably like this:
varrequire("http");var server = http.createServer();server.listen(8888);
So the question is, how do I deploy my application to the VPS? You can't use it http://10.88.77.66:8888 to access it? Yes, the title of the article is the solution.
My environment is roughly the same centos 6 lnmp一键部署 . As lnmp for how to operate, I will not write. Google for yourself
Suppose my domain name is
Linux system for the Rhel5.6,nginx version of nginx-1.1.6.tar.gz, you can download the latest installation on the Internet, because Nginx is based on a number of modules to achieve a powerful function, so to install and compile other module packages, the module package installed here are: Agentzh-encrypt Ed-session-nginx
Through Nginx reverse proxy, will not get the real IP, is to obtain the Nginx IP, to get the real IP to be configured nginx configuration file: nginx.conf
Proxy_set_header X-real-ip $remote _addr;
For example:
######################################################################## #要转发地域名: Upstream t.csdn.com { server 192.168.1.188:8080 max_fails=0 weig
When you use load balancing, you will experience session retention problems, which are commonly used in the following ways:1.IP Hash, assigning requests to different servers based on the IP of the client2.cookie, the server sends a cookie to the client, and a request with a specific cookie is assigned to its publisherNote: Cookies require browser support and sometimes reveal data
1.Sticky Working principle:Sticky is a nginx module that is a
Nginx is a high-performance Web server, reverse proxy server and e-mail (IMAP/POP3) proxy server, with the advantages of low memory consumption and strong concurrency.The function and characteristics of nginx1. Basic functions and characteristics① as a static resource of the Web server , can cache open file descriptors;② as a reverse proxy server , can do cache , load balance ;③ Support FastCGI④ Modular , non-DSO mechanism (unable to load dynamically)
[Nginx] Simple Nginx virtual host configuration and nginx Virtual Host Configuration
Bytes -------------------------------------------------------------------------------------------------------
Configure the VM:
1. Bind a domain name
Vim/etc/hosts # Add a format such as 192.168.1.11 www. chenwei. ws
2. Add a VM
Cd to the root directory, run vhost. sh to add the
1
)
server_name
directives are primarily used to configure name-based virtual hosts (
inside the http > server
),
server_name
The order in which the instructions are received after the request is:
1 . accuracy of server_name matches, for example:
server {
Listen 80;
Server_namessdr.infowww.ssdr.info;
...
}
2 . in * string starting with the wildcard character:
server {
Listen 80;
Server_name*.ssdr.info;
...
}
3 . in * A string that ends with a wildcard character:
server {
Listen 80;
server_name
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.