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

Disable autocomplete in html so it doesn't show history

The input box always displays the input history wh...

Design Association: Why did you look in the wrong place?

I took the bus to work a few days ago. Based on m...

JavaScript ES6 Module Detailed Explanation

Table of contents 0. What is Module 1.Module load...

Tomcat components illustrate the architectural evolution of a web server

1. Who is tomcat? 2. What can tomcat do? Tomcat i...

Detailed explanation of several solutions for JavaScript interruption requests

Table of contents 1 Promise Interrupt the call ch...

How to create LVM for XFS file system in Ubuntu

Preface lvm (Logical Volume Manager) logical volu...

Details of using Vue slot

Table of contents 1. Why use slots? 1.1 slot 1.2 ...

How to install docker on Linux system and log in to docker container through ssh

Note: I use Centos to install docker Step 1: Inst...

HTML input file control limits the type of uploaded files

Add an input file HTML control to the web page: &...

Simple understanding and examples of MySQL index pushdown (ICP)

Preface Index Condition Pushdown (ICP) is a new f...

Nginx configuration to achieve multiple server load balancing

Nginx load balancing server: IP: 192.168.0.4 (Ngi...

Do you know why vue data is a function?

Official website explanation: When a component is...

Problem analysis of using idea to build springboot initializer server

Problem Description Recently, when I was building...