1.防火牆可以加開DNS
To open ports 53 & 43 on the UFW firewall run the commands below:
Command Line 測試localhost
lynx "http://localhost"
Start Apache Web Server
sudo systemctl start apache2
Check status
sudo systemctl status apache2
檢查埠號是否有開啟
nc -zvw3 192.168.1.10 80
檢查網路狀態
sudo netstat -nlp
解決啟動 Apache 網站伺服器時找不到 ServerName 的問題
hostname www.yourdomain.comApache 不紀錄某些log
#不紀錄來自127.0.0.1的連線
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
CustomLog logs/access_log common env=!dontlog
#不紀錄存取robot.txt的連線
SetEnvIf Request_URI "^/robots\.txt$" dontlog
CustomLog logs/access_log common env=!dontlog