current location:Home > Technical Articles > Operation and Maintenance > Nginx

  • How nginx deploys configuration files
    How nginx deploys configuration files
    usernobody;worker_processes2;error_loglogs/error.log;pidlogs/nginx.pid;events{worker_connections10240;accept_mutexon;multi_accepton;useepoll;}http{includemime.types;default_typeapplication/octet-stream;log_formatmain'$remote_addr-$remote_user
    Nginx 1054 2023-05-12 12:01:06
  • What is the method to compile and install nginx1.16.0 in centos7
    What is the method to compile and install nginx1.16.0 in centos7
    1. Install the dependency package yuminstall-ygccgcc-c++pcrepcre-develzlibzlib-developensslopenssl-devel Dependency package description: 1. Compilation depends on the gcc environment, so it requires: gccgcc-c++; 2. PCRE (PerlCompatibleRegularExpressions) is a Perl library, including perl Compatible regular expression library. The http module of nginx uses pcre to parse regular expressions, so the pcre library needs to be installed on Linux. pcre-devel is a secondary development library developed using pcre.
    Nginx 1069 2023-05-12 11:58:05
  • How to install Nginx and modify Nginx configuration file with Docker
    How to install Nginx and modify Nginx configuration file with Docker
    1. Install Nginx1 with Docker. First, make sure you have started docker on the virtual machine. 2. Secondly, log in to the DockerHub official website, then search for nginx, and then enter dockerpullnginx in the virtual machine to download the nginx image. 3. After downloading, please use the dockerimages command to check whether the download is successful! 4. Start nginx, enter the following statement, and press Enter. Here I will briefly explain each parameter. (1) –name: Determine the name of the container. (2) -d specifies that the container is running in the background. (3) -p container exposes the port number. (4) nginx specified
    Nginx 4442 2023-05-12 11:52:06
  • How to record logs in JSON format in nginx
    How to record logs in JSON format in nginx
    Define nginx log format: Copy the code as follows: log_formatlogstash_json'{"@timestamp":"$time_local",''"@fields":{''"remote_addr":"$remote_addr",''"remote_user":&
    Nginx 1446 2023-05-12 11:43:06
  • How to configure HTTP keepalive in Nginx
    How to configure HTTP keepalive in Nginx
    httpkeepalive In the early days of http, each http request required opening a tpcsocket connection, and the tcp connection was disconnected after one use. Using keep-alive can improve this situation, that is, multiple copies of data can be continuously sent in a TCP connection without disconnecting. By using the keep-alive mechanism, the number of TCP connection establishment times can be reduced, which also means that the time_wait status connection can be reduced, thereby improving performance and increasing the throughput rate of the httpd server (fewer TCP connections means fewer system kernel calls, socket accept() and close() calls). However, keep-ali
    Nginx 978 2023-05-12 11:28:13
  • What are the common configurations and techniques of Nginx?
    What are the common configurations and techniques of Nginx?
    Configure multiple domain names for one site server{listen80;server_nameops-coffee.cnb.ops-coffee.cn;}server_name followed by multiple domain names, separate multiple domain names with spaces. Configure multiple sites for one service server{listen80;server_namea .ops-coffee.cn;location/{root/home/project/pa;indexindex.html;}}server{listen80;server_nameops-coffee.cnb.ops-coff
    Nginx 1464 2023-05-12 11:16:15
  • What is the matching logic of Server and Location in Nginx?
    What is the matching logic of Server and Location in Nginx?
    Server matching logic When nginx determines which server block to execute a request, it mainly focuses on the listen and server_name fields in the server block. The listen command listen field defines the IP and port of the server response. If the listen field is not explicitly configured, the default listening 0.0.0.0:80 (root) or 0.0.0.0:8080 (non-root) listen can be configured as: a combination of ip and port, a single ip, listening on port 80 by default, a single port, and listening on all ip interfaces by default A unixsocket path where the last entry is usually only used in different
    Nginx 1725 2023-05-12 11:10:25
  • How to configure Nginx to limit the number of connections for IP addresses in a network segment
    How to configure Nginx to limit the number of connections for IP addresses in a network segment
    The so-called connection limit in nginx is actually a TCP connection, which is the connection status successfully established by the requester after passing a three-way handshake. nginx generally provides us with the ngx_http_limit_conn_module module to provide the connection limit function. This module can limit the number of connections for each key value based on the defined key, such as the number of connections from an IP source. The ngx_http_limit_conn_module directive explains syntax:limit_connzonenumber;default:—context:http,server,location. This directive describes the session state storage area. Save in the key's state
    Nginx 1048 2023-05-12 11:07:06
  • How to compile the ImageMagic library into the nginx server
    How to compile the ImageMagic library into the nginx server
    1. First, add the corresponding header file of the imagemagick library to the environment variable. Copy the code as follows: exportc_include_path=$c_include_path:/usr/local/imagemagick/include/imagemagick/. The following path will depend on each person's situation, otherwise the following will appear. The error copy code is as follows: wand/magickwand.h:nosuchfileordirectory2. Add the corresponding library when linking. In the obj/makefile file, find the following line. The copy code is as follows: objs/nginx:objs/
    Nginx 757 2023-05-12 10:46:20
  • How to configure nginx url redirection
    How to configure nginx url redirection
    The system in this article: centos6.5_x64 three hosts: nginx host, hostname:master.lansgg.comip:192.168.10.128 apache host, hostname:client1.lansgg.comip:192.168.10.129 1. nginx address redirection 2. nginx reverse proxy 1. Address redirection: refers to the technology that directs a user to another URL when he browses a certain URL. It is often used to convert a long URL into a shorter URL. Because when a website is to be disseminated, it is often because the URL is too long and difficult to remember; or it may be because the free web space of the Internet has changed.
    Nginx 9172 2023-05-12 10:31:15
  • How does Nginx implement a service to configure multiple sites?
    How does Nginx implement a service to configure multiple sites?
    One service configures multiple sites server{listen80;server_namea.ops-coffee.cn;location/{root/home/project/pa;indexindex.html;}}server{listen80;server_nameops-coffee.cnb.ops-coffee.cn ;location/{root/home/project/pb;indexindex.html;}}server{listen80;server_namec.ops-coffee.cn;
    Nginx 1422 2023-05-12 10:22:11
  • How to build a picture server with Nginx
    How to build a picture server with Nginx
    Rendering: Requirements: Implement image upload and batch upload technologies: nginx, vsftpd, spring, springmvc, kindeditor, centos Description: The content of this chapter is mainly to implement the image upload function. Kindediter is used to better demonstrate image uploading, echoing, and batch effects. The background code is not directly related to kindediter, so feel free to read it. In addition, there is a mybatis jar in the source code, so don’t pay attention to it. The content of this chapter is not used. It is to prepare for the subsequent content! Source code: See the bottom of the article Scenario: The user uploads the image to the tomcat server, and then the tomcat server uploads it to the nginx server through ftp
    Nginx 2002 2023-05-12 10:19:05
  • How to enable SSL in Nginx
    How to enable SSL in Nginx
    Since you want to purchase an SSL certificate to encrypt and improve the security level of your website, it is inevitable to choose an SSL that is cost-effective. There are many ways to purchase SSL certificates, and some are free. I have tried some free SSL certificates but found them troublesome to renew, unstable and unsafe. The head of SSL product research and development at the domestic CA institution CFCA China Financial Certification Center also said: Website managers and CA institutions should be cautious about free certificates. Because the paid one is not very expensive, I chose the more commonly used ComodoPositiveSSL. It is much cheaper to buy it on gogetssl than on the official website. We take the ComodoPositiveSSL certificate of gogetssl as an example to record the Nginx configuration and installation s
    Nginx 1674 2023-05-12 10:13:23
  • How to deploy Nginx service
    How to deploy Nginx service
    1. Introduction to Nginx: 1.1 What is Nginx? Nginx ("enginex") is an open source software that supports high-performance, high-concurrency www service and proxy service. Developed by Russian IgorSysoev, it was originally used on the large Russian website www.rambler.ru. Nginx has the characteristics of high concurrency and low system resource usage. Nginx can run on UNIX, Linux, DSB, MacOSX, Solaris and Windows operating systems. 1.2 The main features of Nginx support high concurrency: it can support tens of thousands of concurrent connections and consumes less resources: under 30,000 concurrent connections, the first 10 threads consume less than 200MB of memory.
    Nginx 1560 2023-05-12 10:13:17
  • How to install nginx offline on Linux server
    How to install nginx offline on Linux server
    Linux server offline installation nginx1. Resource nginx-1.20.1.tar.gz (the download link includes gcc, g++, pcre, libtool, nginx) Baidu network disk download: link: https://pan.baidu.com/s/ 1avQD-zGYVcj0ttRtnPNTIA extraction code: 6yhi2. Installation steps (1) Install gccrpm-Uvh*.rpm--nodeps--force (2) Install g++rpm-Uvh*.rpm--nodeps--force (3) Verify gcc , whether g++ is installed successfully, execute the command: gcc-vg++-v
    Nginx 1740 2023-05-12 10:07:13

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28