sudo ufw allow 'Apache Full'
sudo firewall-cmd --permanent --add-service=http && sudo firewall-cmd --reload
http://your_server_ip
,看到Apache默认页面即安装成功。/etc/apache2/apache2.conf
(Ubuntu/Debian) 或 /etc/httpd/conf/httpd.conf
(CentOS/RHEL)/etc/apache2/sites-available/
(Ubuntu/Debian) 或 /etc/httpd/conf.d/
(CentOS/RHEL)sudo systemctl restart apache2
sudo systemctl restart httpd
sudo apachectl configtest
sudo httpd -t