先stop apache2,否則會報錯雇寇。
'''
stop apache2
sudo systemctl stop apache2.service
prevent apache2 to start at boot
sudo systemctl disable apache2.service
Reinstall nginx
sudo apt-get install nginx
'''
然后參考以下文檔:https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04-quickstart