How to start and restart nginx in Linux

How to start and restart nginx in Linux

Nginx (engine x) is a high-performance HTTP and reverse proxy web server that also provides IMAP/POP3/SMTP services. Nginx was developed by Igor Sysoev for the second most visited site in Russia, Rambler.ru (Russian: Рамблер). The first public version 0.1.0 was released on October 4, 2004.

Nginx is a lightweight web server/reverse proxy server and email (IMAP/POP3) proxy server released under the BSD-like protocol. Its characteristics are that it occupies less memory and has strong concurrency capabilities. In fact, nginx's concurrency capabilities are indeed better than those of the same type of web servers. Users of nginx websites in mainland China include: Baidu, JD.com, Sina, NetEase, Tencent, Taobao, etc.

So how does Linux start nginx?

1. Enter the sbin directory under the nginx installation directory

2. Execute the following command:

./nginx -c /usr/local/nginx/nginx/conf/nginx.conf

illustrate:

● /usr/local/nginx/nginx/conf/nginx.conf is the path to your own nginx.conf.

● The -c parameter specifies the path of the nginx configuration file to be loaded.

How to restart nginx in Linux?

Restart smoothly:

1. Enter the sbin directory under the nginx installation directory

2. Execute the following command:

./nginx -s reload

You may also be interested in:
  • Detailed explanation of solutions to common 502 errors in Nginx in Linux
  • Tutorial on installing and configuring Nginx on Linux server
  • How to install and start nginx in Linux
  • How to build nginx load balancing under Linux
  • Nginx monitoring issues under Linux

<<:  LayUI+Shiro implements a dynamic menu and remembers the example of menu expansion

>>:  my.cnf (my.ini) important parameter optimization configuration instructions

Recommend

JavaScript canvas Tetris game

Tetris is a very classic little game, and I also ...

MySQL trigger principle and usage example analysis

This article uses examples to explain the princip...

Implementing a simple calculator based on JavaScript

This article shares the specific code of JavaScri...

Tutorial on installing Android Studio on Ubuntu 19 and below

Based on past experience, taking notes after comp...

Detailed explanation of how Tomcat implements asynchronous Servlet

Preface Through my previous Tomcat series of arti...

Practical operation of using any font in a web page with demonstration

I have done some research on "embedding non-...

Detailed explanation of small state management based on React Hooks

Table of contents Implementing state sharing base...

Install Ubuntu 18 without USB drive under Windows 10 using EasyUEFI

1. Check BIOS First check which startup mode your...

Specific use of MySQL operators (and, or, in, not)

Table of contents 1. Introduction 2. Main text 2....

Solution to the inaccessibility of Tencent Cloud Server Tomcat port

I recently configured a server using Tencent Clou...

Detailed usage of Vue timer

This article example shares the specific code of ...

Examples of correct judgment methods for data types in JS

Table of contents Preface Can typeof correctly de...

In-depth understanding of Vue's method of generating QR codes using vue-qr

Table of contents npm download step (1) Import (2...

Write a dynamic clock on a web page in HTML

Use HTML to write a dynamic web clock. The code i...