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或者阿里雲上申請一年的免費證書。

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