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

  • How to optimize nginx under Linux system
    How to optimize nginx under Linux system
    Introduction to nginx: Nginx Nginx (enginex) is a high-performance HTTP and reverse proxy web server. Nginx is a lightweight web server/reverse proxy server. As a rising star, Nginx’s charm has attracted many people. into his arms. The configuration is simple and the implementation principle is simple. There's nothing better than doing a load balancing thing. Specific method to optimize nginx in Linux system 1. Optimize Nginx concurrency [root@proxy~]#ab-n2000-c2000http://192.168.4.5/Benchmarking192.168.4.5(bepatient)so
    Nginx 1122 2023-05-12 20:34:23
  • How to use nginx+tomcat to separate static and dynamic pages
    How to use nginx+tomcat to separate static and dynamic pages
    Experimental environment: windows experimental tools: nginx, tomcat. Installing nginx under windows is very simple. Go to the official website to download the compressed package, decompress it, and double-click the nginx.exe program in the decompressed directory. Then enter localhost in the browser and the following picture will appear, which means nginx is already working. The workflow of nginx is: Externally, nginx is a server. All requests are first requested to nginx, and then nginx distributes the request to the intranet to tomcat. Then tomcat processes the request and sends the data to nginx, and then the data is sent to nginx by nginx. nginx is sent to the user, and the whole process feels to the user that nginx is
    Nginx 794 2023-05-12 20:34:17
  • How to configure nginx monitoring in zabbix
    How to configure nginx monitoring in zabbix
    Case: zabbix configures nginx monitoring 1. Modify the configuration file vim/usr/local/nginx/conf/nginx.conflocation/nginx_status{stub_status;} Description: nginx_status custom field, access address (example: 192.168.169.131/nginx_status) stub_status fixed Parameter #Restart nginx./nginxreload Browser access status description: ActiveconnectionsNginx is processing the number of active links; important serverNginx starts to the present
    Nginx 3138 2023-05-12 20:31:12
  • How to add second-level subdomain names in batches with Nginx
    How to add second-level subdomain names in batches with Nginx
    Copy the code as follows: if($host~*(.*)\.(.*)\.(.*)){set$subdomain$1;}location/{roothtml/$subdomain;indexindex.htmlindex.php;} The "~*" above means that it is not case-sensitive, and then it matches any URL of the "xxx.xxx.xxx" type. In the end, it is a tragedy, not only does it match "www.yourdomian.com" but even "What the fuck.$!" @.com" URLs also match. Um
    Nginx 1197 2023-05-12 20:25:04
  • How to solve the problem of Nginx auto-starting in Centos7
    How to solve the problem of Nginx auto-starting in Centos7
    Regarding setting nginx to start automatically at boot in centos7, we can solve the problem by writing a self-start shell script at boot. Test environment operating system: centos764-bit 1611nginx version: 1.11.10 Configuration parameters during native nginx installation./configure\--prefix=/usr/local/nginx\--pid-path=/usr/local/nginx/logs /nginx.pid\--lock-path=/var/lock/nginx.lock\--error-log-path=/var/log/nginx/err
    Nginx 1312 2023-05-12 20:16:18
  • How to configure Nginx to record and analyze slow response requests and replace website response content
    How to configure Nginx to record and analyze slow response requests and replace website response content
    1. Module installation The nginx third-party module installation method is skipped here. Configuration parameters./configure--prefix=/usr/local/nginx-1.4.1--with-http_stub_status_module\--add-module=../ngx_http_log_request_speed2. Instruction log_request_speed2.1log_request_speed_filter syntax: log_request_speed_filter[on|off] configuration section :n/acontext:loca
    Nginx 2119 2023-05-12 20:16:12
  • How to build a .NET Core2.0+Nginx+Supervisor environment under Centos7 system
    How to build a .NET Core2.0+Nginx+Supervisor environment under Centos7 system
    1. Introduction to linux.netcore. For a long time, Microsoft has only provided .net support for its own platform. This means that support for this "theoretically" cross-platform framework on Linux and macos can only be provided by third-party projects (such as mono. net). Until Microsoft launched .netcore, which is completely open source. This open source platform is compatible with .netstandard and provides fully consistent APIs on windows, linux and macos. Although this compact .net framework is only a subset of standard .net, it is already quite powerful. On the one hand, this small framework allows certain functional applications to run on three platforms at the same time (just like some functional
    Nginx 812 2023-05-12 20:13:18
  • How to install ngnix server under Ubuntu
    How to install ngnix server under Ubuntu
    Install nginx sudo to modify the nginx default port sudovi/etc/nginx/sites-enabled/defaultlisten81default_server; modify the port number you need listen81default_server; restart the nginx server sudo to modify the default website directory vi/etc/nginx/sites-enabled/default#root/var /www/html;root/usr/share/nginx/html;#Modify the default website directory and restart the nginx server
    Nginx 804 2023-05-12 19:55:17
  • How to configure pathinfo mode in nginx
    How to configure pathinfo mode in nginx
    The reason is that I haven’t used Apache for a long time, and I gradually feel unfamiliar with Apache, because my friend has a zendframework framework that was moved from Apache to nginx and requires pathinfo mode support. So I started searching online for articles related to nginx+pathinfo. I thought it would be easy to configure it at first. After searching, I found that there are a lot of articles introducing nginx to enable pathinfo mode, and it seems that it is not difficult. But after several hours, it is still not configured properly. And the contents of a large number of articles are very similar, and they are basically reprinted. Starting to get a little anxious! Because one day has passed and the preparation has not been completed. There is no solution to continue groping, so continue searching. For the convenience of verification, I use a.c
    Nginx 1497 2023-05-12 19:52:04
  • How to implement port forwarding with nginx
    How to implement port forwarding with nginx
    Usage scenario 1. There is a server port in the intranet that needs to be mapped to the external network (for example, the external network server applies for a domain name, and then makes a nignx configuration for the domain name, and then needs to access an intranet http service in the configuration) ) 2. The intranet server does not have access rights to the external network. Only one server in the entire intranet has access to the external network, which can be used to penetrate the internal network of the curve-saving version. 3. The virtual machine only has a NAT network, and the virtual machine is only equipped with an internal network. localhost is forwarded to the host machine localhost. At this time, if you want to access the virtual machine port from the external network or other intranets (non-host machine) 4. Use the agent machine as a bastion machine (springboard machine) to prevent the internal system from being accessed at will. This When the bastion machine is configured with port forwarding, access through the bastion machine
    Nginx 2795 2023-05-12 19:37:12
  • Linux installation nginx server example code analysis
    Linux installation nginx server example code analysis
    nginx relies on some software libraries. Before installation, please make sure that the system has software such as gcc, ssl, pcre, and gzip installed. You can use the rpm-q command to check whether the software is installed. [root@redhat1~]#rpm-qgccgcc-4.1.2-44.el5 The dependent library information is as follows: (1). The gzip module requires the zlib library (2). The rewrite module requires the pcre library (3). The ssl function requires the openssl library If you want to install pcre, download pcre to the destination directory. The version selected here is pcre-8.38. After downloading, perform the following operations tar-zxvfpcre-8.38.tar.gzcdpcre-
    Nginx 754 2023-05-12 18:55:15
  • How to set up Referer in Nginx to prevent image theft
    How to set up Referer in Nginx to prevent image theft
    If the server's pictures are hotlinked by other websites, it will affect the server's bandwidth and access speed. At this time, we need to set the anti-hotlink function of the image file or video file; the anti-hotlink function simply means that you can directly access the resource. , but you cannot put my resource links on your own server for others to access, especially large files such as pictures or videos, which can easily cause the server to respond slowly. If it were not a picture host, I would really be afraid that other websites would directly use the pictures from this site. This kind of traffic is likely to be wiped out all at once. After all, CDNs are bought with free money. Therefore, it is better to set up an anti-hot link, nginx can complete this function. Generally speaking, browsers that comply with the http protocol will access the website from a website.
    Nginx 1647 2023-05-12 18:52:06
  • How to modify nginx configuration to limit the frequency of malicious crawlers
    How to modify nginx configuration to limit the frequency of malicious crawlers
    The code is as follows: #Global configuration limit_req_zone$anti_spiderzone=anti_spider:10mrate=15r/m;#limit_reqzone=anti_spiderburst=30nodelay in a certain server; if ($http_user_agent~*"xxspider|xxbot"){set$anti_spider$http_user_agent;} exceeds The set limit frequency will give the spider a 503.
    Nginx 1172 2023-05-12 18:25:06
  • How to configure ssl in nginx
    How to configure ssl in nginx
    单向SSL配置实例:server{listen443ssl;server_namewww.123.com;root/data/wwwroot/www.123.com/;indexindex.html;ssl_certificateserver.crt;ssl_certificate_keyserver.key;ssl_protocolsTLSv1TLSv1.1TLSv1.2;ssl_ciphersALL:!DH:!EXPORT:!RC4:+HIGH:+MEDIUM:!eNULL;ssl_pref
    Nginx 6684 2023-05-12 17:58:24
  • How to use Nginx reverse proxy and proxy_cache cache to build a CDN server
    How to use Nginx reverse proxy and proxy_cache cache to build a CDN server
    Encountered a problem: It is very slow for mobile users to access the web server www.osyunwei.com. Solution: 1. Place an nginx reverse proxy server in the mobile computer room. 2. Intelligent resolution through domain name dns. When all mobile users access www.osyunwei.com Resolve to nginx reverse proxy server 3. Dedicated line connection between nginx reverse proxy server and web server. Instructions: 1. Web server line: Telecom IP: 192.168.21.129 Domain name: www.osyunwei.com 2. nginx reverse proxy server line : Mobile system: centos6.2ip: 192.168.21.164vi/e
    Nginx 1308 2023-05-12 17:43:12

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