Introduction: Nginx (pronounced the same as engine x) is a lightweight web server/reverse proxy server and email (IMAP/POP3) proxy server released under a BSD-like protocol. Developed by Russian programmer Igor Sysoev, it is used by Russia's large portal website and search engine Rambler (Russian: Рамблер). Its characteristics are that it occupies less memory and has strong concurrency capabilities. In fact, nginx's concurrency capabilities are indeed better than those of the same type of web servers. Users of nginx websites in mainland China include: Sina, NetEase, Tencent, etc. download: Tomcat still uses version 6.0. For configuration, refer to the link below this article Nginx download address: http://nginx.org/ Install:
Related commands:
Configuration: In order to test the integration, the simplest configuration is used here to forward all requests. #Number of working child processes (usually equal to the number of CPUs or twice the number of CPUs) worker_processes 1; #Error log storage path [ debug | info | notice | warn | error | crit ] error_log logs/error.log info; #Specify the pid storage file pid logs/nginx.pid; events { #Use network IO model Linux recommends epoll, FreeBSD recommends kqueue, and window does not specify #use epoll; worker_connections 1024; #maximum number of connections allowed} http { include mime.types; default_type application/octet-stream; keepalive_timeout 65; gzip on; upstream mysvr { # Node list server localhost:10001 weight=5; } server { listen 8008; server_name localhost; charset UTF-8; location / { # All requests are forwarded to this defined node root /ROOT; # Define the default website root directory location of the server index index.html index.htm index.jsp; # Define the name of the homepage index file proxy_pass http://mysvr; # Request to redirect to the server list defined by mysvr} } } The key is to define the node list and then configure the forwarding processing of the request path Deploy any test project on tomcat, and then access it through nginx port + project For ease of use, two bat scripts are written to start and shut down the service start.bat
stop.bat
The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Mysql implements three functions for field splicing
The virtual machine is installed on the host mach...
The SSH mentioned here is called Security Shell. ...
Summary of common functions of PostgreSQL regular...
Step 1: Enter the directory: cd /etc/mysql, view ...
This article shares the specific code of JavaScri...
1. MYSQL index Index: A data structure that helps...
1. Transaction characteristics (ACID) (1) Atomici...
The key codes are as follows: Copy code The code i...
A Multi-Select is a UI element that lists all opt...
This article mainly introduces the installation/st...
Part.0 Background The company's intranet serv...
Without further ado, let me show you the code. Th...
About a year ago, I wrote an article: Analysis of...
1. display:box; Setting this property on an eleme...
Why beautify the file control? Just imagine that a...