在AWS环境(EC2)上安装nginx的方法

软件包更新
$ 使用sudo yum update

安装
$ sudo amazon-linux-extras enable nginx1
$ sudo yum install nginx -y
$ nginx -v

启动
$ sudo systemctl start nginx
$ sudo systemctl status nginx

使用以下命令将NGINX自动启动设置为启用:
$ sudo systemctl enable nginx

在中文中,将以下内容表达为一种方式:
nginx的文档根目录设置
$ vi /etc/nginx/nginx.conf

Nginx的HTTPS文件夹位于/usr/share/nginx/html。

广告
将在 10 秒后关闭
bannerAds