Ubuntu 16.04安装nginx

Ubuntu 16.04安装nginx

安装

安装标准版本

sudo apt-get install nginx

最新

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

启动

sudo systemctl start nginx

测试

浏览器中输入ip地址即可打开,如果不能打开测试页,有可能是安全组没有打开80端口

HTTPS

可以使用Let’s Encrypt或者阿里云上申请一年的免费证书。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章