search
Article Tags
Nginx
How to use nginx simulation for blue-green deployment

How to use nginx simulation for blue-green deployment

Blue-green deployment The focus of blue-green deployment lies in the following characteristics: 1. The blue version and the green version exist at the same time. 2. The actual running environment is blue or green, and can only be one of them. Analysis of advantages and disadvantages through switch control: The advantages are: It's speed and rollback. And the shortcomings are also obvious. Quick rollback is possible because two sets of environments exist at the same time, so the complexity and required resources will increase because there are two sets of environments. In addition, although the speed has been improved, in the implementation process, the switch control, no matter how fast the switching speed, is still unable to achieve completely seamless switching without combining other technologies. Simulate blue-green deployment Next, we use nginx's upstream to simply simulate the blue-green deployment scenario. The specific scenarios are as follows, currently active

Jun 03, 2023 pm 12:31 PM
nginx
How nginx rewrite implements URL jump

How nginx rewrite implements URL jump

URL jump The URL jump mentioned here is to jump to another URL when the user accesses one URL. A common application scenario is to let multiple domain names jump to the same URL (for example, let the old domain name jump to a new domain name), jump static file requests to CDN, etc. Jump to different sites according to the user's device (PC version) , wap version), etc. URL jump can be achieved by setting the window.location on the page with js or by setting the header with php. Of course, it can also be implemented using the rewrite function of nginx. The nginxrewrite module rewrite is the static rewrite module of nginx. The basic usage is rewritepattenre.

Jun 03, 2023 am 11:55 AM
URLnginxrewrite
How to configure nginx log scheduled backup and deletion

How to configure nginx log scheduled backup and deletion

Once the nginx logging function is turned on, nginx will generate log files of a certain size every day. If the system runs stably and there are no problems, then the logs will basically not be viewed. However, if these logs are not cleared in time, they will accumulate day by day and occupy a terrible amount of disk space on the server. In order to solve this problem, use a shell script to regularly back up and delete nginx log files, and only keep them for a period of time. Figure 1: #!/bin/bash#auth:lzq#desc: Back up the current log by date and regenerate the next day’s log file #date:2016-09-18date=`date+%y%m%d`nginx_pid =`cat/var

Jun 03, 2023 am 10:59 AM
nginx
How does Nginx realize 404 automatically jump to the home page?

How does Nginx realize 404 automatically jump to the home page?

404 automatically jumps to the homepage server{location/{error_page404=@ops-coffee;}location@ops-coffee{rewrite.*/permanent;}}. The 404 page on the website is not particularly friendly. We can use the configuration above to prevent 404 from appearing. Then it will automatically jump to the home page.

Jun 03, 2023 am 10:16 AM
nginx
What should I do if nginx deploys vue and cannot find the js css file?

What should I do if nginx deploys vue and cannot find the js css file?

Many times after npmrunbuild, the relative directory of the js file and css file automatically inserted by webpack in the index.html file is always wrong. After publishing it to the server, nginx cannot find the file. vue-cli@3 In vue-cli@3 you need to add a baseurl for all files that your webpack inserts into index.html. You need to create a new vue.config.js in the root directory of the project and add the following content:. ..module.exports={baseurl:isprod?'/basexxx/':

Jun 03, 2023 am 10:05 AM
CSSVUEnginx
Nginx basic introduction to gzip configuration method

Nginx basic introduction to gzip configuration method

Preface gzip (gnu-zip) is a compression technology. After gzip compression, the page size can be reduced to 30% or even smaller than the original size. In this way, users will browse the page much faster. The gzip compressed page needs to be supported by both the browser and the server. It is actually server-side compression. After being transmitted to the browser, the browser decompresses and parses it. We don’t need to worry about the browser, because most current browsers support parsing gzip pages. Whether it is front-end or back-end, nginx is often used when deploying projects, and small projects often use a reverse proxy or something. Today I will be simple and direct and talk about one of the points - gzip. If there are any errors, please correct me. Generally used on the server side is u

Jun 03, 2023 am 09:52 AM
nginxgzip
How to install and configure Nginx on Linux server

How to install and configure Nginx on Linux server

nginx installation 1. Install the compilation tools and library files yum-yinstallmakezlibzlib-develgcc-c++libtoolopensslopenssl-devel 2. First install pcrepcre to enable nginx to support the rewrite function. 1. Download the pcre installation package, download address: [root@bogonsrc]#wgethttp://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz2. Unzip the installation package: [root@bogonsrc

Jun 03, 2023 am 09:40 AM
Linuxnginx
Example analysis of adding account and password verification to nginx

Example analysis of adding account and password verification to nginx

nginx adds account and password authentication server{location/{auth_basic"pleaseinputuser&passwd";auth_basic_user_filekey/auth.key;}}. There are many services accessed through nginx, but they do not provide account authentication functions. You can use the authbase account password authentication provided by nginx. To implement, you can use the following script to generate the account password #catpwd.pl#!/usr/bin/perlusestrict;my$pw=$ARGV[0];printcrypt

Jun 03, 2023 am 09:28 AM
nginx
How to use nginx for load balancing

How to use nginx for load balancing

Four-layer load balancing vs seven-layer load balancing. It is often said that seven-layer load balancing or four-layer load balancing is actually decided based on the name of the layer of the iso osi network model. nginx uses the http protocol to load the application layer. Balanced operation, so it is called seven-layer load balancing. For example, lvs that performs load balancing operations on the tcp layer is called layer 4 load balancing. Generally speaking, there are the following load balancing classifications: Common software support Common load balancing algorithms Common load balancing algorithms include the following: Load balancing demonstration example: ordinary polling Next, use nginx to demonstrate how to perform ordinary polling. : Prepare in advance to start two services on the two ports 7001/7002 for display.

Jun 03, 2023 am 08:19 AM
nginx
How to configure nginx to ensure that the frps server and web share port 80

How to configure nginx to ensure that the frps server and web share port 80

First of all, you will have a doubt, what is frp? Simply put, frp is an intranet penetration tool. After configuring the client, you can access the intranet through the server. Now my server has used nginx as the website, and there is only one port 80. So what should I do if the FRP server also wants to use port 80? After querying, this can be achieved by using nginx's reverse proxy. To add: frps is the server, frpc is the client. Step 1: Modify the nginx.conf configuration file in the server and add the following parameters to http{} in nginx.conf, server{listen80

Jun 03, 2023 am 08:19 AM
webnginxfrps
Analysis of Nginx common configuration examples

Analysis of Nginx common configuration examples

Block IP You can block the specified IP through deny http{#....#Block IPdeny192.168.4.3;deny31.42.145.0/24;deny51.12.35.0/24;}Only to open the intranet, you need to prohibit 192.168.1.1 from being opened first Other intranet segments, and then prohibit all other IPlocation/{#blockoneworkstationdeny192.168.1.1;#allowanyonein192.168.1.0/24allow192.168.1.0/24;#droprestoftheworlddenyall;} negative

Jun 02, 2023 pm 11:14 PM
nginx
How to install and configure Lua support for Nginx

How to install and configure Lua support for Nginx

Nginx installation and configuration Lua support By default, Nginx does not support Lua modules. You need to install the LuaJIT interpreter and recompile Nginx, or you can use the modules required by openrestry developed by Chinese people: LuaJIT, Ngx_devel and lua-nginx-module1. Environment preparation [root @nginx_lua~]#yuminstall-ygccgcc-c++makepcre-develzlib-developenssl-devel2. Download the latest luajit and ngx_devel_kit and lua-nginx-module decompression [r

Jun 02, 2023 pm 10:01 PM
nginxlua
How to configure Nginx multiple domain names under windows

How to configure Nginx multiple domain names under windows

1. The directory structure for installing nginx under windows is as follows: 2. Contents of conf/nginx.conf in the nginx-1.12.1 directory #usernobody;worker_processes1;events{worker_connections1024;}http{includemime.types;default_typeapplication/octet-stream;sendfileon ;keepalive_timeout65;server{listen80default_server;server_n

Jun 02, 2023 pm 09:43 PM
Windowsnginx
How to implement nginx reverse proxy in Centos7

How to implement nginx reverse proxy in Centos7

The reverse proxy server is set up on the server side to relieve the workload of the server by buffering frequently requested pages, forwarding client requests to the target server on the internal network; and returning the results obtained from the server to the Internet to request a connection. At this time, the proxy server and the target host appear as a server to the outside world. Currently, web websites use reverse proxies, which in addition to preventing vicious attacks from the external network on internal servers, caching to reduce server pressure and access security control. Experimental environment: 192.168.1.188nginx load balancer 192.168.1.189web01 server 192.168.1.190web02 server software preparation: cen

Jun 02, 2023 pm 08:16 PM
CentOSnginx

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 Article

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