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

Docker View JVM Memory Usage

1. Enter the host machine of the docker container...

MySQL SQL statement performance tuning simple example

MySQL SQL statement performance tuning simple exa...

How to implement Docker Registry to build a private image warehouse

The image of the microservice will be uploaded to...

Detailed explanation of MySql 5.7.17 free installation configuration tutorial

1. Download the mysql-5.7.17-winx64.zip installat...

Use CSS variables to achieve cool and amazing floating effects

Recently, I found a fun hover animation from the ...

Native js encapsulation seamless carousel function

Native js encapsulated seamless carousel plug-in,...

A brief discussion on the maximum number of open files for MySQL system users

What you learn from books is always shallow, and ...

Detailed explanation of html printing related operations and implementation

The principle is to call the window.print() metho...

Introduction to SSL certificate installation and deployment steps under Nginx

Table of contents Problem description: Installati...

Implementation of fastdfs+nginx cluster construction

1. Introduction to fastdfs 1. What is fastdfs Fas...

Guide to Efficient Use of MySQL Indexes

Preface I believe most people have used MySQL and...

Introduction to new ECMAscript object features

Table of contents 1. Object properties 1.1 Attrib...