Home  >  Article  >  Operation and Maintenance  >  How to start and restart nginx under linux

How to start and restart nginx under linux

王林
王林forward
2020-09-15 17:28:276142browse

How to start and restart nginx under linux

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 do perform better among web servers of the same type. Users of nginx websites in mainland China include: Baidu, JD.com, Sina, NetEase, Tencent, Taobao, etc.

(Recommended tutorial: nginx tutorial)

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

So how to start nginx in linux?

1. Enter the sbin directory under the nginx installation directory

2. Execute the following command:

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

Instructions:

● Where/usr/local /nginx/nginx/conf/nginx.conf is your own nginx.conf path.

● -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

The above is the detailed content of How to start and restart nginx under linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete