current location:Home > Technical Articles > Operation and Maintenance > Nginx

  • How to upgrade smoothly in nginx operation and maintenance
    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 1329 2023-05-15 17:34:06
  • How to set up nginx+rtmp live broadcast server on Mac
    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 1624 2023-05-15 17:19:06
  • How to use Nginx's map instruction to achieve page jump
    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 804 2023-05-15 17:16:12
  • How to enable Brotli compression algorithm for Nginx
    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 1294 2023-05-15 15:52:06
  • How to add cookie information to nginx logs
    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 1652 2023-05-15 15:34:06
  • How to configure nginx SSL certificate to implement https service
    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 1652 2023-05-15 15:25:06
  • How nginx forces the browser to redirect HTTPS access
    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 4821 2023-05-15 14:34:06
  • nginx location matching method
    nginx location matching method
    Detailed explanation of nginxlocation matching examples Example 1, nginx configuration: Example 2, nginx configuration: Example 3, nginx configuration:
    Nginx 2487 2023-05-15 14:25:13
  • How to limit access frequency per unit time in nginx
    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 744 2023-05-15 13:43:06
  • What is the difference between nginx, tomcat and apache?
    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 2373 2023-05-15 13:40:06
  • How to configure Nginx anti-hotlinking method
    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 1482 2023-05-15 13:28:11
  • Analysis of Nginx server installation examples under CentOS7
    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 710 2023-05-15 12:58:06
  • How to limit the maximum number of connections in Nginx server
    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 2171 2023-05-15 12:55:06
  • Nginx+Tomcat reverse proxy, load balancing, cluster deployment methods
    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 682 2023-05-15 12:37:06
  • How does Nginx enable the browser to view access logs in real time?
    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 1397 2023-05-15 12:31:22

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!