search
Article Tags
Nginx
How to implement Nginx operation response header information

How to implement Nginx operation response header information

Prerequisite: The ngx_http_headers_module module needs to be compiled to support header information operations. add_header means adding custom header information to the response header. The instruction is add_headernamevalue[always];, which can be used in http{}, server{}, location {}, ifinlocation{} context, only takes effect when the response status code is equal to 200, 201 (1.3.10), 204, 206, 301, 302, 303, 304, 307 (1.1.16, 1.0.13), or 308 (1.13.0), if alw

May 13, 2023 pm 03:31 PM
nginx
How to deploy a react project in nginx

How to deploy a react project in nginx

Test item react-demo Clone your react-demo project to the server (by default, Github is used to manage our projects) If necessary, please install the project environment such as node.js, yarn, etc. Enter the project directory, execute npm to run the build, and start building the project. After a successful build, a dist folder will be generated (depending on your project configuration), and the static files in this folder will become the access files of our project. To configure Nginx, Linux server enter: /etc/nginx/sites-enabled, then as administrator, create a new configuration file for your react project such as react-demo.conf

May 13, 2023 pm 03:28 PM
Reactnginx
How to configure Nginx reverse proxy using SSL

How to configure Nginx reverse proxy using SSL

Prerequisites 1. Backend Server: For the purpose of this tutorial, we are using tomcat server running on localhost on port 8080 Note: - When you start proxying requests, make sure that the application server is started. 2. SSL certificate: We also need to configure the SSL certificate on the server. We can use let'sencrypt's encryption certificate, you can get one using the program mentioned here. But for this tutorial, we will use a self-signed certificate, which can be created by running the following command from the terminal, $opensslreq-x509-nodes-days365-newkeyrsa:2048-keyout/etc

May 13, 2023 pm 03:19 PM
sslnginx
How to configure Nginx to implement encryption certificate access

How to configure Nginx to implement encryption certificate access

Enterprise use: Some enterprises require encryption of company data for security measures. Web encryption is also an important part, so you need to add a self-built certificate. Install the certificate. Remember three types of files, the basic CA certificate and the secondary CA certificate (containing some company personal information, used to identify the owner of the certificate), and then use this certificate to generate a real certificate for distribution and use. opensslgenrsa-des3-outca.key2048#ca level 1 private key (will require you to enter the password twice in succession, remember to keep it the same) opensslreq-new-keyca.key-outserver.csr#Level 2 encrypted file generated based on the private key (will Let's enter the private key password, CN, BJ, B

May 13, 2023 pm 03:07 PM
nginx
What is the method to install nginx plug-in files under Docker?

What is the method to install nginx plug-in files under Docker?

The purpose of the plug-in file: The file is not restricted by the docker image file. It can be modified, the container can be restarted, and the updated file can be used. It will not be restored by the image. Files such as logs and other information recorded during the running of the container can be automatically saved externally. In terms of storage, there are two ways to run the container without losing it due to container restart: dockerrun command docker-compose command dockerrun command method, use the -v parameter to mount the external host directory to the path inside the container, there are multiple mount points , it is specified through multiple -v parameters, and only absolute paths can be used; the docker-compose command is easy to describe through service. To be precise, a service can be included

May 13, 2023 pm 03:04 PM
Dockernginx
How to add Nginx to system service in CentOS7

How to add Nginx to system service in CentOS7

To view services, first check the service status of nginx and enter systemctlstatusnginx. The result is as follows: no relevant services were found. The next step is to add system services. Add system service Add nginx.service in the /usr/lib/systemd/system directory and modify it according to the actual situation. For detailed analysis, please see the article in the reference materials below. The content is as follows [unit]description=nginx-highperformancewebserverdocumentation=http://nginx.org/en/docs/after=network

May 13, 2023 pm 02:49 PM
nginxcentos7
How does Nginx solve the 404 problem of page refresh in history mode?

How does Nginx solve the 404 problem of page refresh in history mode?

The pre-knowledge single-page application (SPA-singlepage application) only returns the unique html page and its public static resources when the page is loaded for the first time. Subsequent page jumps will not get the html file from the server. (Hash and history routing implement browser URL changes without refreshing the page) Hash routing example: www.baidu.com/#/home. Originally hash is used to control the page view in combination with anchor points. When the value after # changes The page will not be re-requested, which is mainly achieved through the window's onhashchange method. Compared with hash routing, the most intuitive change of history routing is

May 13, 2023 pm 02:40 PM
nginxhistory
How to build a picture server on Linux platform through nginx and vsftpd

How to build a picture server on Linux platform through nginx and vsftpd

1. nginx installation 1. nginx installation environment nginx is developed in C language. It is recommended to run on Linux. This tutorial uses centos6.5 as the installation environment. To install nginx, you need to compile the source code downloaded from the official website first. The compilation depends on the gcc environment. If there is no gcc environment, you need to install gcc: yuminstallgcc-c++pcre (perlcompatibleregularexpressions) is a perl library, including a 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. yuminsta

May 13, 2023 pm 02:28 PM
Linuxnginxvsftpd
How to configure Nginx page jump according to different browser languages

How to configure Nginx page jump according to different browser languages

Simplified and Traditional Chinese I want to decide whether to provide simplified or traditional Chinese files based on the accept-language in the http header. In chrome, chrome://settings/languages ​​can set the preferred language, and the browser will set the accept-language header accordingly. A better way to handle it is to parse the field, obtain the qvalue, and select the most appropriate language based on priority. But it is only used to support Simplified and Traditional Chinese. I want to use a trick: ignore the priority. As long as the words zh-hant, zh-tw, zh-hk, etc. appear in accept-language, return to Traditional Chinese, otherwise return to Simplified Chinese. map$http_accep

May 13, 2023 pm 01:37 PM
nginx
What is the processing flow of Nginx event-driven framework?

What is the processing flow of Nginx event-driven framework?

The ngx_event_process_init method of the ngx_event_core_module module does some initialization of the event module. This includes setting the handler corresponding to a read event such as "request connection" to the ngx_event_accept function, and adding this event to the epoll module. When a new connection event occurs, ngx_event_accept will be called. The general process is as follows: the worker process continuously calls the ngx_process_events_and_timers function in the ngx_worker_process_cycle method for processing.

May 13, 2023 pm 01:34 PM
nginx
How to optimize Nginx and Node.js for high-load networks

How to optimize Nginx and Node.js for high-load networks

If network optimization does not first understand the underlying transmission mechanisms of nginx and node.js and carry out targeted optimization, no matter how detailed the optimization of the two is, it may be in vain. Generally, nginx connects the client and upstream applications through tcpsocket. Our system has many thresholds and restrictions for tcp, which are set through kernel parameters. The default values ​​of these parameters are often set for general purposes and cannot meet the high traffic and short life requirements of web servers. Here are some parameters that are candidates for tuning tcp. To make them effective, you can place them in the /etc/sysctl.conf file, or put them in a new configuration file, such as /etc/sysctl.

May 13, 2023 pm 01:31 PM
Node.jsnginx
How to use the nginx.vim tool for syntax highlighting and formatting to configure the nginx.conf file

How to use the nginx.vim tool for syntax highlighting and formatting to configure the nginx.conf file

I use tengine, the installation directory is /usr/local/tengine. 1. Download nginx.vim 2. Upload nginx.vim to ~/.vim/syntax/, and add the following content to the file ~/.vim/filetype.vim: aubufread,bufnewfile/etc/nginx/*,/ usr/local/nginx/conf/*if&ft==''|setfiletypenginx|endif (flexibly configured according to the nginx installation directory) If there are no directories and files, create them.

May 13, 2023 pm 01:28 PM
nginxnginx.conf
How to implement hidden jump in Nginx

How to implement hidden jump in Nginx

Nginx's hidden jump can jump the request to a page on another website, and the URL in the browser remains unchanged. Rewrite rules need to be used in Nginx configuration. Two examples are provided below to illustrate the configuration of this jump requirement: 1. Nginx hidden jump configuration example 1 jumps the request path https://jb51.net/data/test to https://jb51.com/ data/test/test.html page. server{listen443;server_namejb51.net;access_log/data/nginx/logs/jb51.net-

May 13, 2023 pm 01:25 PM
nginx
How to implement nginx multi-domain forwarding

How to implement nginx multi-domain forwarding

Basic concept DNSDNS is the abbreviation of DomainNameSystem, which is the domain name system. DNS is a service on the Internet, generally called domain name service or domain name resolution service. It mainly provides services for converting website domain names and IP addresses. Correspondence between domain names and IPs There is a one-to-one correspondence between domain names and IP addresses, but multiple domain names can correspond to the same IP address. Just like the relationship between a person's name and their ID number, it is obviously much easier to remember a person's name than their ID number. An IP address is a numerical address that identifies a user's site on the Internet. To make it easier to remember, domain names are used instead of IP addresses to represent site addresses. DNS resolves domain names into IP addresses so that they correspond one to one. DNS work

May 13, 2023 pm 12:58 PM
nginx

Hot tools Tags

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use