Category: Nginx

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 …

How to Fix 502 Bad Gateway Error

nginx 502 Bad Gateway Fix Under High Load  When nginx is under high load, uploading images or executing scripts that take a long time constantly results in 502 Bad

Gateway . I searched online and most solutions are the same article by Master Zhang about increasing fastcgi response …

How to Fix Nginx 504 Gateway Time-out

When configuring the LNMP stack on CentOS, I’ve always used the same set of config files without any issues. However, recently after setting up the same environment on a VPS, the site became extremely slow with just over 10 people online. Several times it hit the limit set in Nginx …

How to 301 Redirect Nginx to WWW Domain Using Rewrite

First, you must define test.com and www.test.com in your domain management panel to point to your host’s IP address. You can test this using the nslookup command:
Simply enter nslookup test.com and nslookup www.test.com, and ensure both have A records pointing to the IP address. Second, we can then proceed in ng …