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

  • How to configure Nginx access restrictions
    How to configure Nginx access restrictions
    What is nginx access restriction? Configuration nginx access restriction can be based on two aspects. One is IP-based access control, and the other is user-trusted login control. Below we will introduce these two methods one by one. Introduction to IP-based access control: Yes By configuring IP-based access control, you can achieve the effect of allowing certain IPs to access and restricting which IPs cannot access. This is the configuration method to allow access. Configuration syntax: allowaddress|cidr|unix|all; Default configuration: No configuration Configuration path: http , server, location, limit_except; this is a configuration method that does not allow access. Configuration syntax: denyaddress|c
    Nginx 2443 2023-05-13 10:46:05
  • nginx signal set example analysis
    nginx signal set example analysis
    Scenario Reproduction Below I will use a native nginx to reproduce this process on my virtual machine with fedora26 installed. The nginx version I use is the latest 1.13.4. First start nginx and you can see that both the master and the worker have been Running. Then we send a sigusr2 signal to the master. When the nginx core receives this signal, it will trigger a hot update. You can see that the new master and the workers from the masterfork are already running. At this time, we then send a sigwinch signal to the old master. After receiving this signal, the old master will send si to its workers.
    Nginx 1145 2023-05-13 10:37:16
  • How to intercept specific user agent in Nginx
    How to intercept specific user agent in Nginx
    Blacklist specific user agents in nginx To configure the user agent blocking list, open your website's nginx configuration file and find the server definitions section. This file may be placed in different places, depending on your nginx configuration or linux version (e.g., /etc/nginx/nginx.conf, /etc/nginx/sites-enabled/, /usr/local/nginx/conf /nginx.conf,/etc/nginx/conf.d/). Copy the code as follows: server{listen80default_server;server_nam
    Nginx 1389 2023-05-13 10:25:05
  • How Nginx redirects HTTP to HTTPS
    How Nginx redirects HTTP to HTTPS
    Nginx is a powerful redirection tool that can be easily configured to redirect insecure or unencrypted HTTP web traffic to encrypted and secure HTTPS web servers on your system. Nginx, pronounced "Enginex," is a free, open source, Linux-based high-performance web and reverse proxy server responsible for managing and handling the load of the largest website traffic on the Internet. Nginx is a powerful redirection tool that can be easily configured to redirect insecure or unencrypted HTTP web traffic to encrypted and secure HTTPS web servers on your system. If you are a system administrator or developer, then you should use Nginx server frequently. In this article we will
    Nginx 3397 2023-05-13 09:52:13
  • How to solve the 500 Internal Server Error error in Nginx
    How to solve the 500 Internal Server Error error in Nginx
    1. Is there insufficient disk space? Use df-k to check whether the hard disk space is full. Clearing up hard drive space can resolve 500 errors. If accesslog is enabled in nginx, it is best to close accesslog when it is not needed. Accesslog takes up a lot of hard disk space. 2. The nginx configuration file is wrong? This does not refer to syntax errors. If nginx has a syntax error in the configuration file, it will prompt it when it is started. When configuring rewrite, 500 errors may occur if some rules are not handled properly. Please check your rewrite rules carefully. If some variables in the configuration file are set improperly, a 500 error will also occur, such as referencing a variable with no value. 3. Such as
    Nginx 5012 2023-05-13 09:28:21
  • How to configure Nginx to monitor SSL certificate on port 443
    How to configure Nginx to monitor SSL certificate on port 443
    1. Prepare the certificate file. I am using the Alibaba Cloud Symantec free version SSL certificate. Download the certificate file and decompress it to get the following file. Create an ssl directory in the nginx–>cert directory and copy all the above files to the ssl directory. 2. Modify the nginx.conf file and fill in the following in http{} of nginx.conf. Content server{listen443;server_namewww.httpstest.com;sslon;roothtml;indexindex.htmlindex.htm;#Replace the .pem/.key file here with its corresponding file name ssl_
    Nginx 2780 2023-05-13 09:19:05
  • How to configure the root&alias file path and index directory in Nginx
    How to configure the root&alias file path and index directory in Nginx
    Root&alias file path configuration nginx has two ways to specify the file path: root and alias. The usage differences between the two are summarized below to facilitate quick response during the application process. The main difference between root and alias is how nginx interprets the uri after location, which causes the two to map requests to server files in different ways. [root] Syntax: rootpath Default value: roothtml Configuration section: http, server, location, if [alias] Syntax: aliaspath Configuration section: location Example: location~^/we
    Nginx 1842 2023-05-13 09:10:14
  • How to configure and optimize Nginx static file service
    How to configure and optimize Nginx static file service
    Root Directory and Index Files The root directive specifies the root directory that will be used to search for files. To get the path to the requested file, nginx appends the request uri to the path specified by the root directive. This directive can be placed at any level in the http{}, server{} or location{} context. In the following example, the root directive is defined for the virtual server. It applies to all location{} blocks that do not contain a root directive to explicitly redefine the root: server{root/www/data;location/{}location/images/{}location~\.(mp3|mp4){root /www/me
    Nginx 1727 2023-05-13 09:04:13
  • How to use the upstream module in Nginx
    How to use the upstream module in Nginx
    Introduction to upstream module nginx modules are generally divided into three major categories: handler, filter and upstream. In the previous chapters, readers have already learned about handlers and filters. Using these two types of modules, nginx can easily complete any stand-alone work. The upstream module will enable nginx to transcend the limitations of a single machine and complete the reception, processing and forwarding of network data. The data forwarding function provides nginx with horizontal processing capabilities across a single machine, freeing nginx from the limitation of only providing a single function for terminal nodes, and enabling it to have the functions of splitting, encapsulating, and integrating at the network application level. Data forwarding is nginx's ability to build a network application
    Nginx 1789 2023-05-13 08:40:12
  • How to use Nginx to build a picture server in windows
    How to use Nginx to build a picture server in windows
    1. Go to the official website to download the nginx compressed package. The decompressed directory is as follows 2. In the decompressed conf/nginx.conf configuration file, add or modify the code with colored places #usernobody;worker_processes1;#error_loglogs/error.log; #error_loglogs/error.lognotice;#error_loglogs/error.loginfo;#pidlogs/nginx.pid;events{worker_connections1024;}http{includemime
    Nginx 2429 2023-05-13 08:34:22
  • Nginx configuration file structure method
    Nginx configuration file structure method
    nginx was designed and developed by lgorsysoev for the rambler.ru site, which is the second most visited site in Russia. Since its release in 2004, it has become nearly mature and perfect with the power of open source. nginx is rich in functions and can be used as an http server, a reverse proxy server, and a mail server. Supports fastcgi, ssl, virtualhost, urlrewrite, gzip and other functions. And supports many third-party module extensions. Nginx's stability, feature set, sample configuration files, and low system resource consumption have allowed it to catch up, with a usage rate of 12.18% of the world's active websites, approximately 22.2 million websites. nginx common functions
    Nginx 1595 2023-05-13 08:34:16
  • How to install and deploy Nginx and configure https in Centos7.3
    How to install and deploy Nginx and configure https in Centos7.3
    Installation environment 1.gcc installation To install nginx, you need to compile the source code downloaded from the official website first. Compilation depends on the gcc environment: yuminstallgcc-c++2.pcrepcre-devel installation pcre-devel is a secondary development library developed using pcre. : yuminstall-ypcrepcre-devel3.zlib Installing the zlib library provides many compression and decompression methods. nginx can use zlib to gzip the contents of the http package: yuminstall-yzlibzlib-devel4.openssl Install a strong secure socket layer password library, has the main password
    Nginx 986 2023-05-13 08:16:12
  • How to configure php, nginx, redis in Ubuntu
    How to configure php, nginx, redis in Ubuntu
    Ubuntu18.04.1-LTS-64 configuration php, nginx, redis is important as mentioned above: 1. The following installations are performed in the system root directory, that is: ubuntu@VM-0-8-ubuntu:/$Execute the command here; 2. To modify the following configuration files, it is best to back up the original files first. 1. To install nginx, enter the command: sudoapt-getinstallnginx. After the installation is successful, go to the system root
    Nginx 1422 2023-05-12 23:28:04
  • How to configure nginx in centos server
    How to configure nginx in centos server
    Download the secure terminal mobaxterm_personal. First, after downloading the secure terminal, connect to your own public network IP and the display will be as shown above after successful connection. Introduction to nginx nginx is a lightweight web server and reverse proxy server. Compared with apache and lighttpd, it has the advantages of less memory and high stability. Its most common use is to provide a reverse proxy service. After connecting to the server, the first step: install gccgcc-c++. The command is: yuminstall-ygccgcc-c++. The second step: install the pcre library $cd/usr/local/$wgethttp:// jaist.dl.sourceforge.net/p
    Nginx 1192 2023-05-12 23:25:04
  • How to configure Nginx second-level domain name
    How to configure Nginx second-level domain name
    When a domain name needs to be used on two projects, we need to use the second-level domain name. Configure the second-level domain name in Nginx as follows: 1. The original configuration file is as follows worker_processes1;events{worker_connections1024;}http{includemime.types;default_typeapplication /octet-stream;sendfileon;keepalive_timeout65;server{listen80;server_namelocalhost;location/{roothtm
    Nginx 4816 2023-05-12 23:22:04

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