Article Tags
How to build and configure nginx server

How to build and configure nginx server

1. Installation of compilation tools and library files depends on library installation, and must be installed in order: (1) If the c++ compilation environment is not installed, yuminstallgcc-c++ (2) The ssl function requires the openssl library wgethttps://www.openssl.org/source/ openssl-1.1.0f.tar.gztar-zxvfopenssl-1.1.0f.tar.gzcdopenssl-1.1.0f./configmake&&makeinstall(3) The rewrite module requires the pcre library wgethttps://ftp.pc

May 26, 2023 pm 04:13 PM
nginx
How to set whitelist in Nginx through geo module

How to set whitelist in Nginx through geo module

Original configuration: http{......limit_conn_zone$binary_remote_addrzone=one:10m;limit_req_zone$binary_remote_addrzone=fifa:10mrate=5r/s;......server{......limit_connone5;limit_reqzone=fifaburst =100;......}}White name placement: http{......geo$whiteiplist{default1;127.0.0.10;10.10.0.0

May 26, 2023 pm 01:10 PM
nginx
How to solve nginx not prompting php error

How to solve nginx not prompting php error

1. Understand error reporting and collection methods. During the process of deploying the server, we habitually turn off the error output of PHP. This is because PHP error messages may expose security risks or lead to information leakage. But during the development process, we need these error messages to locate problems and debug the program. One way to solve this problem is to turn on PHP's error output. In PHP we can set the error log level or report errors immediately. At the same time, we can also add some options to the Nginx configuration file to display PHP error messages. 2. PHP error settings in the Nginx configuration file. Open the Nginx server configuration file, usually /etc/nginx/nginx.conf

May 26, 2023 pm 01:03 PM
PHP nginx
How to configure the nginx-http-footer-filter module of Nginx server

How to configure the nginx-http-footer-filter module of Nginx server

1.What exactly does nginx-http-footer-filter do? To put it bluntly, it means inserting the code you want to insert at the bottom of the requested page. 2. What can we use nginx-http-footer-filter for? 1. Add js code uniformly for statistics (this is what I think) 2. Add the realsver (backend real server) information that responds to this request at the bottom to facilitate system administrators to troubleshoot. 3. You manage a large number of virtual hosts , append your advertising code, black link, etc. (very shameless) behind all web pages. 4. Draw inferences from one example and think about what you can use it for. What does Taobao use it for? Open the Taobao homepage, view its source code, drag it to the bottom

May 26, 2023 pm 12:31 PM
nginx
How to use nginx proxy to access static resources

How to use nginx proxy to access static resources

1. Goal: In order to request static resources (css, pictures, etc.) through nginx, page preview is performed through the nginx proxy. 2. Implementation effect: Enter the nginx proxy address through the browser to open the page to access the local html file, or you can access the proxy routing access interface to achieve the page preview function. Note: What I demonstrate is configuration three in the local windows development environment. Specific configuration 1. nginx configures the local static project agent. Find the nginx configuration file nginx.conf and configure the nginx agent server{listen80;#Front-end portal project location/{aliasD:/workspace/sc-multip

May 26, 2023 pm 12:25 PM
nginx
How to build a load balancing server based on Centos7+Nginx+Tomcat8

How to build a load balancing server based on Centos7+Nginx+Tomcat8

After manually installing nginx, everything is normal, and there are no problems with the configuration of the virtual host and load balancing. It was successfully enabled. The specific configuration file is as follows: Added: includevhost/*.conf; to the nginx.conf file of conf to introduce all the .conf files in the vhost directory. In order to make it easy to configure in the future, of course, if necessary, You can also add them one by one. Because the load service is an api service, the name of the conf file here is called api.xxx.com.conf. The configuration of opening the file is as follows: The ip polling method is not used here, but the usstream method is used. Specifically What is the difference between these methods?

May 26, 2023 am 11:43 AM
nginx centos7 tomcat
Example analysis of nginx opening directory listing

Example analysis of nginx opening directory listing

nginx enables column directory When you want nginx to exist as a file download server, you need to enable nginx column directory server{locationdownload{autoindexon;autoindex_exact_sizeoff;autoindex_localtimeon;}}autoindex_exact_size: When it is on (default), the exact size of the file is displayed, in byte ;Change to off to display the approximate size of the file, in KB or MB or GBautoindex_localtime: When it is off (default), the file time displayed is GMT time; after changing to on, it is displayed

May 26, 2023 am 11:36 AM
nginx
How to enable pathinfo in nginx

How to enable pathinfo in nginx

To transfer apache to nginx, $_server['path_info'] is used on the code side. Pathinfo is not enabled by default for nginx. So we have to manually enable 1, url rewrite location/{//Method 1if(!-e$request_filename){rewrite^/(.*)$/index.php/$1last;break;}}location/{/ /Method 2try_files$uri$uri//index.php$uri;}2, pathinfo sets location~.

May 26, 2023 am 10:43 AM
nginx pathinfo
How to set nginx current limit

How to set nginx current limit

1. Current limiting nginx Set up nginx current limiting using the module upstream and place it in the http module #current limit concurrency upstreamnode{server127.0.0.1:8080max_conns=1;}#Exceeding requests will return a 502 status code and place it in the server module #Test address, Accessing the server py path will be forwarded to the local machine's 8080 port location/py{proxy_passhttp://node/;}#Error redirected to the downgrade interface error_page502503https://fund/b.html; Note: If one / is missing, it will Forward the request to 8080/

May 26, 2023 am 10:07 AM
nginx
How to achieve Nginx high availability

How to achieve Nginx high availability

Preparation work: 192.168.16.128192.168.16.129 two virtual machines. Install Nginx. Install Nginx and update the yum source file: rpm-ivhhttp://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpmwget-O/ etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-7.repoInstall Nginx

May 25, 2023 pm 11:31 PM
nginx
How to realize the coexistence of Nginx and Apache under Linux server

How to realize the coexistence of Nginx and Apache under Linux server

Two programs cannot listen on the same port at the same time. So another way of thinking is to solve the problem of coexistence of some websites running under nginx and some websites running under apache on the same server. Solution: Use nginx as a proxy server and web server. nginx listens to port 80, and apache listens to ports other than 80. I am temporarily using port 8080. Solution: Once the Linux environment is set up, nginx and apache are installed successively. Since the default ports are: 80, the server port requested by general customers defaults to 80, so nginx is set as a static page port: 80; apache sets the port to: 8080 (in httpd Repair in .conf file

May 25, 2023 pm 11:28 PM
Linux nginx apache
How to configure Nginx for NodeJS application load balancing

How to configure Nginx for NodeJS application load balancing

Load balancing can allocate user requests to multiple servers for processing, thereby achieving access support for a large number of users. The load balancing architecture is shown in the figure: For complex web applications, using nginx for front-end load balancing is a matter of course. Next, we use nginx for load balancing of nodejs applications. 1. Configure nginx and modify nginx.conf: upstreamsample{server127.0.0.1:3000;server127.0.0.1:3001;keepalive64;}server{listen80;....server_name127.0.0.1;...

May 25, 2023 pm 11:19 PM
nginx nodejs
How to configure GZip compression when a Node.js site uses Nginx as a reverse proxy

How to configure GZip compression when a Node.js site uses Nginx as a reverse proxy

For a site developed with node.js, if you also use nginx to implement reverse proxy, you can easily implement gzip compression on the server side to make site browsing smoother. Prerequisite: node.js+nginx reverse proxy. node.js required Work done: versions below express4.0: app.use(express.compress()); // Mainly this sentence app.use(express.json()); app.use(express.urlencoded()); app .use(express.bodyparser());app.use(express.met

May 25, 2023 pm 07:13 PM
Node.js nginx gzip
How nginx automatically generates configuration files in docker containers

How nginx automatically generates configuration files in docker containers

The final command to implement the idea is probably like this: dockerrun-d-p80:80-exxx=xx Image name Script path in the image The script here will replace the cmd command in the dockerfile, so we need to build a shell that automatically generates and starts nginx script. #!/bin/bash#Get the beginning of lt from the environment variable, in order to distinguish it from other environment variables, for example, lt_analysis=172.17.0.1:8083result=""forain$(env|grep^lt)doold_ifs="$ifs"ifs =&qu

May 25, 2023 pm 06:25 PM
Docker 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 Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

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

Hot Topics

Java Tutorial
1670
14
PHP Tutorial
1276
29
C# Tutorial
1256
24