sudo apt install nginx
nginx -v
nginx version: nginx/1.18.0 (Ubuntu)
sudo systemctl enable nginx
sudo systemctl status nginx
※ nginxの起動ユーザーはデフォルトでwww-data
となります。
curl -4 icanhazip.com
ブラウザでhttp://your_server_ip_address
にアクセスします。
Welcome to nginx!
の画面が表示されれば、OKです。
ちなみに、ファイヤーウォールは無効化されている状態です。
sudo ufw status verbose
Status: inactive