一、安装 Nginx
apt-get install nginx
二、配置 Nginx
vim /etc/nginx/nginx.conf
三、Nginx 语法检查
cd /usr/sbin
.nginx -t
如果现实下面内容,则说明 nignx.conf
没有语法问题
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
四、重启 Nginx
cd /usr/sbin
.nginx -s reload