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 upgrade smoothly in nginx operation and maintenance
- You can replace the old nginx executable with the new one without interrupting service - new requests will not be lost (when upgrading to a new version or adding/removing server modules). (Recommended learning: nginx operation and maintenance) First, use the new executable program to replace the old one (it is best to make a backup), and then send the USR2 (kill-USR2pid) signal to the main process. The main process will rename its .pid file to .oldbin (for example: /usr/local/nginx/logs/nginx.pid.oldbin), then execute the new executable program, and start the new main process and new work in sequence Process: PIDPPIDUSER%CP
- Nginx 1391 2023-05-15 17:34:06
-
- How to set up nginx+rtmp live broadcast server on Mac
- 1. Install homebrow. If you have already installed brow, you can skip this step directly. Execute the command ruby-e "$(curl-fsslhttps://raw.githubusercontent.com/homebrew/install/master/install)". If it has been installed and want to uninstall: ruby-e"$(curl-fsslhttps:/ /raw.githubusercontent.com/homebrew/install/master/uninstall)" 2. Install ngin
- Nginx 1723 2023-05-15 17:19:06
-
- How to use Nginx's map instruction to achieve page jump
- The implementation method is to add map directive rules in the http domain of nginx.conf, which contains a url rule mapping file: #Set 301 jump map$request_uri$new{include/etc/nginx/redirect.map;} The map directive supports the introduction of a The way to map files, the content format of redirect.map file here is as follows: ~^/page/mordern-php$/page/modern-php; currently only one line is added as a test, the front can be a regular expression, and the back is to jump The new url to arrive, each line ending with a semicolon. Since the website has https enabled, it is monitoring 4
- Nginx 884 2023-05-15 17:16:12
-
- How to enable Brotli compression algorithm for Nginx
- What is brotli compression algorithm brotli was originally released in 2015 for offline compression of web fonts. Google software engineers released an enhanced version of brotli in September 2015 that included general lossless data compression, with a special focus on http compression. The encoder has been partially rewritten to improve compression ratio, both the encoder and decoder have been increased in speed, and the streaming API has been improved to add more compression quality levels. The new version also showcases cross-platform performance improvements and reduced memory required for decoding. Unlike common general purpose compression algorithms, brotli uses a predefined 120 kilobyte dictionary. The dictionary contains over 13,000 commonly used words, phrases, and other substrings drawn from a text
- Nginx 1388 2023-05-15 15:52:06
-
- How to add cookie information to nginx logs
- 1. It is more convenient to obtain all cookie information. Directly add $http_cookielog_formatmain'[$time_local]-$remote_addr:$remote_port-$remote_user-$upstream_addr$upstream_status$upstream_response_time-''"$request"$status in the nginx.conf file $bytes_sent$request_ti
- Nginx 1734 2023-05-15 15:34:06
-
- How to configure nginx SSL certificate to implement https service
- If my current node basic structure is as follows: |----project||---static#store html files|||---index.html#index.html||---node_modules#dependency package||-- -app.js#node entry file||---package.json||---.babelrc#Convert es6 file index.html file code is as follows: nginx configuration https Welcome to use https to access the page app.js code is as follows: constkoa =require('koa');constfs
- Nginx 1757 2023-05-15 15:25:06
-
- How nginx forces the browser to redirect HTTPS access
- The effect can be seen as follows: But if we use http to access now, we cannot access it. As shown in the figure below: So the first thing I have to do now is to use nginx configuration. When the user enters an http request in the browser, use nginx to redirect to https. So we now need to make a simple nginx redirection function. Therefore, we need to add the following redirection configuration to our nginx: server{listenxxx.abc.com;server_namexxx.abc.com;rewrite^/(.*)$https://$host$1permanent;} Therefore, the main configuration of nginx code
- Nginx 4922 2023-05-15 14:34:06
-
- nginx location matching method
- Detailed explanation of nginxlocation matching examples Example 1, nginx configuration: Example 2, nginx configuration: Example 3, nginx configuration:
- Nginx 2563 2023-05-15 14:25:13
-
- How to limit access frequency per unit time in nginx
- First of all, I encountered this problem because the website was attacked and Alibaba Cloud called the police. I thought of limiting the access frequency instead of limiting IP addresses (the plan for limiting IP addresses will be given later). The status code returned by nginx when the connection resources are exhausted is 502. After adding the restrictions of this solution, it returns 599, which is different from the normal status code. The steps are as follows: First, add the following content to nginx.conf: map$http_x_forwarded_for$clientrealip{""$remote_addr;~^(?p[0-9\.]+),?.*$$firstaddr;}###safesettingtolimitther
- Nginx 809 2023-05-15 13:43:06
-
- What is the difference between nginx, tomcat and apache?
- 1. The difference between Nginx and tomcat. Nginx is commonly used as a static content service and proxy server. It directly forwards external requests to subsequent application servers (tomcat, Django, etc.). Tomcat is more used as an application container to allow javawebapp to soak in things. . Strictly speaking, Apache and nginx should be called HTTPServer, while tomcat is an ApplicationServer and a container for Servlet/JSO applications. The client accesses resources stored on the server (HTML files, image files, etc.) through HTTPServer. HTTPServer only
- Nginx 2458 2023-05-15 13:40:06
-
- How to configure Nginx anti-hotlinking method
- Requirements: Generally, sites want to protect their website’s videos and pictures from being stolen. After all, video traffic costs nothing (rich people don’t need to think about it)~~. 1. Let’s get straight to the point, first go to the nginx configuration file server{ listen80;server_namewww.test.com;root/data/web/;indexindex.phpindex.html;access_log/data/logs/nginx/biao.madacode.access.logmain;location/{root/home/data/;}error_page40
- Nginx 1567 2023-05-15 13:28:11
-
- Analysis of Nginx server installation examples under CentOS7
- The environment required for installation nginx is developed in C language. It is recommended to run on Linux. Of course, you can also install the windows version. This article uses centos7 as the installation environment. 1. gcc installation To install nginx, you need to compile the source code downloaded from the official website first. Compilation depends on the gcc environment. If there is no gcc environment, you need to install: yuminstallgcc-c++ 2. pcrepcre-devel installation pcre (perlcompatibleregularexpressions) is a perl library, including perl Compatible regular expression library. nginx's http module uses PCRE to parse regular expressions, so
- Nginx 798 2023-05-15 12:58:06
-
- How to limit the maximum number of connections in Nginx server
- Limit the maximum number of connections in the http module. Set limit_conn_zone outside the server module. You can set the connected IP in http. Set limit_conn in the server or location module. You can set the maximum number of IP connections. For example: limit_conn_zone$binary_remote_addrzone=addr:5m;limit_connaddr1;
- Nginx 2278 2023-05-15 12:55:06
-
- Nginx+Tomcat reverse proxy, load balancing, cluster deployment methods
- Performance comparison between nginx and other servers: Tomcat server is oriented to Java language and is a heavyweight server, while nginx is a lightweight server. The apache server is stable, open source, and cross-platform. However, the apache server does not support high concurrency. Nginx can support processing of millions of TCP connections and more than 100,000 concurrent connections, and is a good cross-platform server. The main advantages of nginx are that it can achieve high concurrency, simple deployment, low memory consumption, and low cost. The main disadvantages are that the rewrite function is not powerful enough and there are not as many modules as apache. This article mainly explains the deployment of nginx+tomcat reverse proxy and load balancing, focusing on popular and practical methods. This article
- Nginx 772 2023-05-15 12:37:06
-
- How does Nginx enable the browser to view access logs in real time?
- 1. First check the nginx version. I am using version 1.9.7. The installation directory is /application/nginx-1.9.7[root@ansheng~]#/application/nginx-1.9.7/sbin/nginx-vnginxversion: nginx/1.9.7builtbygcc4.4.720120313(redhat4.4.7-16)(gcc)configurearguments:--prefix=/application/nginx-1.9.7--user=nginx--group=
- Nginx 1473 2023-05-15 12:31:22