Category: Web

Apache (16)
GlassFish (0)
HAProxy (2)
IIS (20)
Nginx (55)
Other (4)
Tomcat (17)

Nginx 301 Domain Redirect

Why Use 301 Redirects In website construction, there are many scenarios requiring page redirects: such as changes to the site directory structure, page renaming, changing page extensions, or altering the site domain name. Without a redirect, visitors using old addresses from their bookmarks or search engine databases will only end up with a 40 …

How to Customize Nginx 404 and 502 Error Pages

There are many tutorials online for customizing Apache 404 error pages, and it’s not very difficult. Today, we’ll mainly discuss configuring 404 error pages under Nginx on Linux systems. While there are also many related articles online, the status code returned is 200 (a normal status code). When search engines crawl error pages …

Viewing Apache Connection Count on Linux

1. Check Apache current concurrent connections:
  netstat -an | grep ESTABLISHED | wc -l
  Compare with the MaxClients value in httpd.conf to see the difference.
  2. Check number of processes:
  ps aux|grep httpd|wc -l
  3. You can use the following parameters to view data …

Nginx Gzip Compression Configuration (Part 2)

gzip (GNU-ZIP) is a compression technology.
Pages compressed with gzip can shrink to 30% or even less of their original size. That’s why many websites use gzip compression to reduce bandwidth consumption, boost page load speed, and deliver a better user experience.
gzip-compressed pages require both the browser and the serv…

Nginx Gzip Compression Configuration

As Nginx continues to evolve, more and more websites are adopting it, making Nginx optimization increasingly important. Today, let’s take a look at how Nginx’s gzip compression actually works.

gzip (GNU-ZIP) is a compression technique. After gzip compression, page size can be reduced to about 3 …

Nginx+PHP Causing Excessive TIME_WAIT Connections

Original work, reprinting allowed. When reprinting, please be sure to indicate the original source, author information, and this statement in the form of a hyperlink. Otherwise, legal liability will be pursued. http://leven.blog.51cto.com/1675811/382097

1. Causes of TIME_WAIT: 1. The existing load balancing module of nginx …

How to Check Nginx Concurrent Connections

By monitoring Nginx’s concurrent connections, we can get a clearer picture of a website’s load. There are two methods to check Nginx concurrency (I say this because the author only knows two): one is through the web interface, and the other is via command line. The web method tends to display more precise results than the command method …

Nginx Start, Restart, and Stop Commands

How to Stop Nginx: A Step-by-Step Guide
Stopping Nginx is done by sending a signal to the Nginx process (refer to Linux articles to learn what a signal is).
Step 1: Find the Nginx master process ID
ps -ef | grep nginx
In the process list, locate the master process; its PID number is the master process ID.
Step 2: Send the signal to gracefully stop Nginx …