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

How to start and restart nginx under linux

王林
Release: 2020-09-15 17:28:27
forward
6146 people have browsed it

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
Copy after login

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
Copy after login

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!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template