從Apache到Nginx
Step 1. 清除Apache2
sudo apt-get remove apache2 sudo apt-get purge apache2 sudo apt-get autoremove
Step 2. 安裝Nginx
sudo apt-get update sudo apt-get install nginx sudo ufw allow 'Nginx HTTP' sudo ufw enable sudo ufw status
Step 3. 打開http://server_domain_or_IP
PS. 記得檢查/etc/nginx/sites-available/default裡的root是指到哪裡