reads configurations, generates on demand, and recycles worker threads. The worker thread is only responsible for responding to user requests.
During nginx upgrade, you only need to replace the binary execution file. When a new connection comes, the new worker thread will be used. The old worker thread will still be used for the old connection and will not be recycled until it is disconnected.
8. Dynamic Loading of modules is not supported, but
Nginx is a short, very powerful Web server that can also be used as a reverse proxy server and a mail server. In addition Nginx can also be used to build a simple streaming media server. Based on this, this article describes the construction of a simple streaming media server on top of Nginx 1.8, and proxies it to a streaming media server by means of a reverse pr
Bytes -----------------------------------------------------------------------------------------------
Nginx: http://www.nginx.net
[Email protected] Black Eye poet
Install nginx in the window => 'start'-'run'-'cmd' and execute the following doscommand
D:
Cd d: \ nginx
Start nginx
Process Management:
options then Exit
-T : Test configuration and Exit -T: Test configuration, dump it and exit-
Q : Suppress Non-err or messages during configuration testing-
s signal : Send signal to a master process:stop, quit, reopen, reload -
P prefix : Set prefix path (default:none)-
c filename : Set configuration file (Default:conf/nginx . conf)-
G Directives:set G
Switching from Nginx to Tengine is mainly due to the Concat module (merge js, CSS), as well as dynamic loading module function (DSO).
If you have installed Nginx in Apt-get mode, you can try the following steps to switch to Tengine (you do not need to uninstall Nginx):
1. To the official download your favorite version of Tengine, here in the latest version (1.4
-http_stub_status_module: Support for nginx status query-With-http_ssl_module: Support for HTTPS-With-http_spdy_module: support Google spdy, would like to know Baidu spdy, this must have SSL support-With-PCRE: To support rewrite, you must specify a PCRE
The output is as follows, indicating that configure is OK......
checking for zlib library ... found
creating objs/Makefile
Configuration summary
+
Tomcat:
Service tomcatstart
Nginx and Tomcat Integration
Tomcat configuration:
UnpackWARs = "true" autoDeploy = "true">
......
Edit Nginx. conf In the conf folder under the nginx installation directory
Server {listen 80; server_name localhost; index index.htm
Load Balancing between Nginx and tomcat on Nginx server, nginxtomcat
This article explains how to use Nginx for reverse load balancing and load balancing between nginx and tomcat server clusters.
I. Load Balancing between nginx and tomcat
1. Create a file
Install Nginx and FastDFS integration in the Linux Nginx FastDFS Module
Nginx is a high-performance HTTP and reverse proxy server and an IMAP/POP3/SMTP proxy server. Nginx was developed by the Rambler.ru site with the highest access volume in Russia as Igor Sysoev. It has been running on this site for more than two and
}, { "backup": false, "down": false, "Fail_timeout": "10s", "id": 2, "Max_conns": 200, "Max_fails": 1, "route": "", "server": "192.168.78.66:80", "slow_start": "0s", "weight": + } }
Best Practices for configuration
It is a good practice to create separate directories and files for different application configurations and include then merge them together with instructions. The standard NGINX
Startup script for the Nginx HTTP Server # it is v.0.0.2 version. # chkconfig:-85 15 # description: Nginx is a high-performance web and proxy server. # It has a lot of features, but it's not for everyone. # processname: nginx # pidfile:/var/run/nginx. pid # config:/usr/local/nginx
application disk I/O heavy load applications, you can set it to off to balance the disk and network I/O processing speed and reduce the system uptime.Sendfile on;# Tcp_nopush on;# Connection timeout# Keepalive_timeout 0;Keepalive_timeout 65;Tcp_nodelay on;# Enable gzip CompressionGzip on;Gzip_disable "MSIE [1-6] \. (?!. * SV1 )";# Set Request BufferClient_header_buffer_size 1 k;Large_client_header_buffers 4 4 k;Include/etc/
Nginx rwrite and add Nginx modules that do not record specific statuses
Requirement: log.bkjia.com/q.gif is successfully accessed, 404 is returned for other paths, and 404 is not logged.
Step 1: Configure nginx rewrite1. Configure nginx rewriteServer {Listen 8000;Server_name log.bkjia.com;# Index q.gif;Root/app/data/qm
# Report that the shared database cannot be found [cause of high version]
# Search for shared libraries
Find/-name libpcre. so *
# Add the path searched by pcre
Vim/etc/ld. so. conf
/Usr/local/lib
# Link to dynamic library
Ldconfig
# Check Port
Netstat-lnt
# Check the process
Ps aux | grep nginx
# Check whether 80 is nginx
) status_of_proc-P/var/run/$ name. PID "$ daemon" nginx Exit 0 | exit $?; *) N =/etc/init. d/$ nameecho "Usage: $ n {START | stop | restart | reload | force-Reload | status}"> 2 exit 1 ;; esacexit 0 then you can use sudo/etc/init. d/nginx start (stop | restart | status) and other commands and parameters are used to c
CentOS.
2. Provide the minimum permission through the mount Parameter
Create independent partitions for your/html/PHP files. For example, create a/dev/sda5 partition and mount it on/ngnix. Make sure/ngnix uses noexec, nodev, and nosetuid permissions for mounting. Below is a mount instance of mine:
LABEL =/nginx/NginxExt3Defaults, nosuid, noexec, nodev 1 2
Note that you need to use the fdisk and mkfs. ext3 commands to create a new partition.
3. Use/
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.