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

Installation and configuration tutorial of MySQL 8.0.16 under Win10

1. Unzip MySQL 8.0.16 The dada folder and my.ini ...

Introduction to JavaScript Number and Math Objects

Table of contents 1. Number in JavaScript 2. Math...

Exploring the use of percentage values ​​in the background-position property

How background-position affects the display of ba...

Some methods to optimize query speed when MySQL processes massive data

In the actual projects I participated in, I found...

React Fiber structure creation steps

Table of contents React Fiber Creation 1. Before ...

js basic syntax and maven project configuration tutorial case

Table of contents 1. js statement Second, js arra...

JavaScript to achieve magnifying glass effect

This article shares the specific code for JavaScr...

Detailed explanation of the usage of Object.assign() in ES6

Table of contents 2. Purpose 2.1 Adding propertie...

Summary of XHTML application in web design study

<br />Generally speaking, the file organizat...

Several common methods of sending requests using axios in React

Table of contents Install and introduce axios dep...

HTML table tag tutorial (27): cell background image attribute BACKGROUND

We can set a background image for the cell, and w...

Detailed example of how to implement transaction commit and rollback in mysql

Recently, we need to perform a scheduled migratio...

Summary of methods to clear cache in Linux system

1) Introduction to cache mechanism In the Linux s...