current location:Home > Technical Articles > Operation and Maintenance > Nginx
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- 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
- Nginx 1962 2023-05-26 16:13:06
-
- 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
- Nginx 1202 2023-05-26 13:10:51
-
- 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
- Nginx 1825 2023-05-26 13:03:46
-
- 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
- Nginx 1230 2023-05-26 12:31:46
-
- 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
- Nginx 9336 2023-05-26 12:25:20
-
- 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?
- Nginx 1634 2023-05-26 11:43:13
-
- 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
- Nginx 1544 2023-05-26 11:36:40
-
- 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~.
- Nginx 1221 2023-05-26 10:43:13
-
- 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/
- Nginx 2342 2023-05-26 10:07:26
-
- 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
- Nginx 1211 2023-05-25 23:31:04
-
- 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
- Nginx 1919 2023-05-25 23:28:13
-
- 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;...
- Nginx 1524 2023-05-25 23:19:04
-
- 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
- Nginx 1305 2023-05-25 19:13:04
-
- 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
- Nginx 1086 2023-05-25 18:25:06
-
- How to configure nginx on 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 2429 2023-05-25 15:58:06