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
This article describes the import and export oper...
yum install vsftpd [root@localhost etc]# yum -y i...
This article summarizes the common commands for L...
Hello everyone, I am Tony, a teacher who only tal...
1. Target environment Windows 7 64-bit 2. Materia...
I've been using redis recently and I find it ...
This article shares the specific code of Vue to i...
I was bored and suddenly thought of the implementa...
The default scroll bar style in Windows is ugly, ...
How to write configuration files and use MyBatis ...
Table of contents question: There are 2 tokens in...
Operation effectCode Implementation html <div ...
1. Create a sequence table CREATE TABLE `sequence...
1. First create the file (cd to the directory whe...
Table of contents rem vw Adapt to third-party UI ...