Nếu trong quá trình sử dụng, mỗi lần khởi động lại (reboot) mà không truy cập được website, bạn cần làm theo hướng dẫn sau để máy chủ tự động mở Port.
Tắt firewalld
Đăng nhập vào SSH, chạy lệnh sau:
systemctl disable firewalld.service systemctl stop firewalld.service
Cập nhật IPtables
Lưu ý: Nếu bạn chưa cài đặt IPtables, dùng lệnh sau:
yum install iptables-services
Ở tập tin /etc/sysconfig/iptables-config
, cập nhật:
IPTABLES_SAVE_ON_RESTART="yes"
Sau đó, chạy lại các lệnh:
systemctl start iptables.service iptables -I INPUT -p tcp --dport 80 -j ACCEPT iptables -I INPUT -p tcp --dport 443 -j ACCEPT systemctl enable iptables.service service iptables save systemctl restart iptables.service
Chúc các bạn thành công!