Article Tags
How to configure Nginx log format

How to configure Nginx log format

A small reservation program is launched and configured to access the entrance through Nginx. The default log does not have request time, so it needs to be configured to record the access response time of each request for reference and optimized use. 1. Default Log format The default log format is as follows (the default is commented out, and the system will automatically use it): #log_formatmain'$remote_addr-$remote_user[$time_local]"$request"'#'$status$body_bytes_sent"$http

May 15, 2023 pm 10:43 PM
nginx
How to deploy Django through Nginx based on ubuntu

How to deploy Django through Nginx based on ubuntu

1. Install nginx. Nginx is a lightweight web server/reverse proxy server and email (imap/pop3) proxy server, and is released under a bsd-like protocol. Its characteristics are that it occupies less memory and has strong concurrency capabilities. In fact, nginx's concurrency capabilities do perform better among web servers of the same type. nginx is also a very popular web server currently. We will also give a brief introduction here to use it to deploy django. nginx official website: Open the ubuntu console (ctrl+alt+t) and use the ubuntu warehouse to install. fnngj@ubuntu:~$sudoapt-getinstallngin

May 15, 2023 pm 10:31 PM
Ubuntu nginx django
How to deploy nginx to access projects built by vue-cli

How to deploy nginx to access projects built by vue-cli

The specific method is as follows: 1. Create the backend server object upstreammixVueServer{serverbaidu.com;#This is your own server domain name} 2. Create the access port and reverse proxy rule server{listen8082;server_namelocalhost;location/{rootE:/mix_vue/dist;# Locate the directory of the project#indexindex.htmlindex.htm;try_files$uri$uri//index.html;#Configure according to the rules of the official website}location~\.php${proxy_p

May 15, 2023 pm 10:25 PM
nginx vue-cli
How to solve the error when nginx service starts after Linux restarts: nginx: [emerg] open()

How to solve the error when nginx service starts after Linux restarts: nginx: [emerg] open()

Problem: After Linux restarts, an error occurs when starting the nginx server. Solution: 1. Use the command cd/usr/local/nginx/conf to enter the specified directory 2. Use the command vinginx.conf to modify the configuration file and remove the # sign in the icon 3. Change it to pid /usr/local/nginx/logs/nginx.pid;

May 15, 2023 pm 10:16 PM
Linux nginx
How to set up browser negotiation cache based on nginx

How to set up browser negotiation cache based on nginx

The difference between strong cache and negotiated cache. Strong cache: The browser directly accesses the browser cache without negotiating with the server. Negotiated cache: The browser will first confirm the validity of the resource with the server before deciding whether to retrieve the resource from the cache or re-obtain the resource. Negotiate How Caching Works: There is a business scenario like this: the back-end static resources will be updated from time to time, and because the browser uses strong caching by default, outdated resources will be fetched from the browser cache by default. Now we want the browser to confirm with the backend whether the resource has been updated every time it obtains the resource, so we need to set the browser to use negotiation cache. So how does the backend determine whether the resource has been updated? At this time, the etag and last-modified response headers will be used. every time

May 15, 2023 pm 10:07 PM
nginx
How to set up pseudo-static WeCenter in Nginx environment

How to set up pseudo-static WeCenter in Nginx environment

Place the WeCenter Q&A system into the aks directory under the site root directory, and configure the pseudo message requirement code as follows: rewrite^([^\.]*)/ask/static/(.*)$$1/ask/static/$2last; rewrite^([^\.]*)/ask/uploads/(.*)$$1/ask/uploads/$2last;rewrite^([^\.]*)/ask/(.*)$$1/ask /index.php?/$2last;rewrite^([^\.]*)/ask/topic/(.*)$$1/ask/cnurl.phpl

May 15, 2023 pm 09:52 PM
nginx WeCenter
How to deal with Nginx discarding http packet body

How to deal with Nginx discarding http packet body

nginx discards http package body processing example detailed explanation http framework discards http request package body and the previous article http framework receives package body are two methods provided by the http framework for each http module to call to decide what to do with the package body deal with. Whether to choose to discard or receive is determined by the module. For example, if the static resource module receives a get request from the browser and requests a file, it can directly return the content of the file to the browser. There is no need to receive the package body data, and the get request will not actually have a package body. Therefore, the static resource module will call the discard packet body function provided by the http framework to perform packet discard processing. Compared with the process of receiving the package body, the operation of discarding the package body is much simpler.

May 15, 2023 pm 09:49 PM
Http nginx
How to use nginx forward proxy to forward intranet domain names

How to use nginx forward proxy to forward intranet domain names

In the customer's intranet environment, ppoe dial-up is used to access the Internet. The provider is a secondary operator within the group. The network environment is relatively complex. The group's internal network and office network are interconnected using a static routing protocol. The general situation is as follows: It turns out that the customer accesses the production business. They are all accessed through IP addresses. As more and more production services are produced, customers now strongly require the use of domain names to access services. However, given the complexity of the intranet environment, it is difficult to deploy a domain name server, and it is also difficult to deploy access services. Later, I learned nginx and learned that nginx can implement forward proxy to forward domain names. Instructions: 1. Configure domain name resolution on Alibaba Cloud. For example, oa.xxxx.com, the resolution address is the intranet address 172.31.101.362, 172.

May 15, 2023 pm 09:46 PM
nginx
How to use Docker Compose to implement nginx load balancing

How to use Docker Compose to implement nginx load balancing

Use docker network management and container ip settings as basic knowledge to implement nginx load balancing. View all docker networks dockernetworkls/*networkidnamedriverscopeb832b168ca9abridgebridgelocal373be82d3a6acomposetest_defaultbridgelocala360425082c4hosthostlocal154f600f0e90nonenulllocal*///composetest_default is the previous article when introducing compose, do

May 15, 2023 pm 09:37 PM
Docker nginx compose
How to use Nginx to limit access frequency, download rate and number of concurrent connections

How to use Nginx to limit access frequency, download rate and number of concurrent connections

1. Overview of modules and instructions used to limit access frequency, concurrent connections, and download speed ngx_http_limit_req_module: used to limit the number of requests per unit time, that is, rate limit, using the leaky bucket algorithm "leakybucket" ngx_http_limit_conn_module: used to limit connections at the same time Number, that is, concurrency limit limit_rate and limit_rate_after: Download speed setting leaky bucket algorithm (leakybucket) The algorithm idea is: water (request) is poured into the bucket from above, flows out from below the bucket (processed), and the water that is too late to flow out is stored in the bucket (buffer) , flows out at a fixed rate; when the bucket is full, the water

May 15, 2023 pm 09:22 PM
nginx
How to configure common functions after Nginx installation

How to configure common functions after Nginx installation

1. Separate the main configuration file from the virtual host. If there are many virtual hosts, it will be more convenient to separate them. They can also be divided according to functions and services. The following takes two virtual hosts as an example. Complete configuration file after removing blank lines and comments: [root@nginx-01conf]#egrep-v"#|^$"nginx.conf.bakworker_processes1;events{worker_connections1024;}http{includemime.types;default_typeapplication/octet- stream;send

May 15, 2023 pm 09:19 PM
nginx
How to solve the problem of Nginx forwarding lost cookies

How to solve the problem of Nginx forwarding lost cookies

1. Lost Cookies Operation path one: http://localhost:8080/content/requestAction!showMainServiceReqDetail.action path two: http://localhost/content/requestAction!showMainServiceReqDetail.action path three: http://localhost/clp/ requestAction!showMainServiceReqDetail.action path one is direct access, path two is the same as path

May 15, 2023 pm 09:10 PM
nginx cookies
How to achieve high availability by combining keepalived with nginx

How to achieve high availability by combining keepalived with nginx

1. Introduction keepalived is a high-availability solution for LVS services based on the vrrp protocol, which can be used to avoid single points of failure. An LVS service will have two servers running keepalived, one as the main server (master) and one as the backup server (backup), but it appears as a virtual IP to the outside world. The main server will send specific messages to the backup server. When the backup server When the server cannot receive this message, that is, when the main server goes down, the backup server will take over the virtual IP and continue to provide services, thereby ensuring high availability. keepalived is the perfect implementation of vrrp, so before introducing keepalived, let’s introduce v

May 15, 2023 pm 09:07 PM
nginx keepalived
How to configure Nginx virtual host in CentOS7.3

How to configure Nginx virtual host in CentOS7.3

Experimental environment A minimally installed centos7.3 virtual machine configures the basic environment 1. Install nginxyuminstall-yepel-*yumisntall-ynginxvim 2. Establish the site root directory of the virtual machine host mkdir/var/wwwrootmkdir/var/wwwroot/site1mkdir/var/ wwwroot/site2echo-e"site1">>/var/wwwroot/site1/index.htmlecho-e"site2">>/var/

May 15, 2023 pm 08:55 PM
CentOS 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