Web/그 외
[CentOS] Apache 웹서버 설치
hjkongkong
2022. 2. 21. 16:50
yum list installed | grep httpd
yum installed -y httpd
방화벽 처리 - 톰캣용 8080도 미리한다.
firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --zone=public --permanent --add-service=https
firewall-cmd --zone=public --permanent --add-port=80/tcp
firewall-cmd --zone=public --permanent --add-port=8080/tcp
systemctl enable httpd
systemctl start httpd
systemctl status httpd
->오류
[apache start 오류] AH00558: httpd: Could not reliably determine the server's fully qualified domain
서버 이름을 설정안해서 오류가 발생하는 것.
/etc/httpd/conf/httpd.conf 파일의 ServerName의 주석을 제거한 뒤 ifconfig했을 때 나오는 아이피로 바꿔준 뒤 아파치 restart
http://아이피로 접속하면 초기화면을 볼 수 있다. /var/www/html에 index.html을 만들면 해당 페이지가 보인다.