Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
web 서버에 아파치를 설치해서 구동했는데 위와 같은 메시지가 떴다.
대충 작업 실패했으니 systemctl status httpd.service나 journalctl -xe을 참조하셈
그래서 systemctl status httpd.service을 봤는데 딱히 별게 없어서 journalctl -xe을 써봤더니 오류메시지가 쫘르륵 나왔다.
-- Unit httpd.service has begun starting up.
Sep 14 10:35:17 deas-webhp1 httpd[22897]: AH00526: Syntax error on line 165 of /etc/httpd/conf/httpd.conf:
Sep 14 10:35:17 deas-webhp1 httpd[22897]: Invalid command 'index.jsp', perhaps misspelled or defined by a module not included in the server configuration
Sep 14 10:35:17 deas-webhp1 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 14 10:35:17 deas-webhp1 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
원인은 문장 오류였다... 궁금해서 가봤더니 DirectoryIndex 이 부분인데 줄바꿈이 되어 있으면 오류가 난다고 한다...
DirectoryIndex는 여러개 적어도 된다. 앞 쪽에 있는게 우선권이 있으니 메인이 되는 확장자 파일을 보고 앞 쪽에 작성해주면 된다. 당장 jsp 파일이 존재하지 않고 그냥 html쪽으로만 연결해줘도 괜찮기 때문에 아래 줄을 지워줬다.
둘 다 작성하고 싶다면
DirectiryIndex index.html index.jsp
이렇게 한 줄에 적어주면 됨.
'개발공부 > 개발하다_발견함' 카테고리의 다른 글
터미널로 자바 컴파일해서 실행해보기 (0) | 2022.09.19 |
---|---|
패키지 이름을 바꾸고 싶었다 (feat.전자정부프레임워크 낱낱히 헤집어보기) (1) | 2022.09.16 |
IntelliJ에서 메이븐(maven) 프로젝트를 git clone 했는데 pom.xml 이 있음에도 maven project로 인식하지 못할 경우 (0) | 2022.09.09 |
mysql 활용하기 (0) | 2022.09.05 |
컨플루언스 써보고 싶었다 (1) | 2022.09.02 |
댓글