AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 471 will probably never match because it overlaps an earlier Alias.

박영준·2024년 4월 26일
0

Troubleshooting

목록 보기
24/29

1. 발생한 문제

ps -ef | grep apache 를 통해 아파치가 가동중인 것을 확인했고

netstat -ntlp | grep :80 으로 아파치가 80포트인 것을 확인하려했지만 80포트를 확인할 수 없었다.

혹시나 싶어 아파치를 가동시켰더니 아래와 같은 에러 메시지가 발생했다.

[root@localhost bin]# ./apachectl start
[Thu Apr 25 16:58:21.886976 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 471 will probably never match because it overlaps an earlier Alias.
[Thu Apr 25 16:58:21.887025 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 472 will probably never match because it overlaps an earlier Alias.
[Thu Apr 25 16:58:21.887028 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 473 will probably never match because it overlaps an earlier Alias.
[Thu Apr 25 16:58:21.887031 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 474 will probably never match because it overlaps an earlier Alias.
[Thu Apr 25 16:58:21.887033 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 475 will probably never match because it overlaps an earlier Alias.
[Thu Apr 25 16:58:21.887035 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 476 will probably never match because it overlaps an earlier Alias.
[Thu Apr 25 16:58:21.887036 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 477 will probably never match because it overlaps an earlier Alias.
[Thu Apr 25 16:58:21.887038 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 478 will probably never match because it overlaps an earlier Alias.
[Thu Apr 25 16:58:21.887040 2024] [alias:warn] [pid 28033:tid 140569539500928] AH00671: The Alias directive in /home/hso100/apache/conf/httpd.conf at line 479 will probably never match because it overlaps an earlier Alias.

2. 발생 원인

Alias 가 겹친다는 메시지였다.
알리아스는 apache/conf/httpd.conf (아파치 기본설정파일) 에 세팅되어있다.

메시지를 따라 471번째 줄로 갔다.

    Alias /sign/ "/home/hso100/hip/data/sign/"
    Alias /cimg/ "/home/hso100/hip/data/tmp/cimg/"
    Alias /org/ "/home/hso100/hip/data/org/"
    Alias /form/ "/home/hso100/hip/data/form/"
    Alias /boardhome/ "/home/hso100/hip/data/boardhome/"
    Alias /reuse/ "/home/hso100/hip/data/tmp/reuse/"
    Alias /bbstrans "/home/hso100/hip/data/tmp/bbstrans/"

    ## tomcat1
    Alias /bms "/home/hso100/tomcat/webapps/bms/"
    Alias /cloudfolder "/home/hso100/tomcat/webapps/cloudfolder/"
    Alias /contact "/home/hso100/tomcat/webapps/contact/"
    Alias /directory-web "/home/hso100/tomcat/webapps/directory-web/"
    Alias /hscalendar "/home/hso100/tomcat/webapps/hscalendar/"
    Alias /square "/home/hso100/tomcat/webapps/square/"
    Alias /wma "/home/hso100/tomcat/webapps/wma/"
    Alias /hbbs "/home/hso100/tomcat/webapps/hbbs/"
    Alias /hcop "/home/hso100/tomcat/webapps/hcop/"

    ## tomcat2
    Alias /bms "/home/hso100/tomcat2/webapps/bms/"						# 471번째 줄
    Alias /cloudfolder "/home/hso100/tomcat2/webapps/cloudfolder/"
    Alias /contact "/home/hso100/tomcat2/webapps/contact/"
    Alias /directory-web "/home/hso100/tomcat2/webapps/directory-web/"
    Alias /hscalendar "/home/hso100/tomcat2/webapps/hscalendar/"
    Alias /square "/home/hso100/tomcat2/webapps/square/"
    Alias /wma "/home/hso100/tomcat2/webapps/wma/"
    Alias /hbbs "/home/hso100/tomcat2/webapps/hbbs/"
    Alias /hcop "/home/hso100/tomcat2/webapps/hcop/"					# 479번째 줄

    Alias /apprthumbnail/ "/home/hso100/doc/shared/thumbnail/"
    ErrorDocument 401 /error.jsp
    ErrorDocument 403 /error_403.jsp
    ErrorDocument 404 /error_404.jsp
    ErrorDocument 500 /error.jsp
    ErrorDocument 505 /error.jsp

3. 해결법

tomcat을 2개 설정했지만 각 tomcat에 들어간 Alias로 나타낸 모듈들의 경로가 동일했다.
따라서 tomcat1, 2 각각에 있는 모듈들을 서로 구분할 수 있도록 '2'를 붙여주었다.

    ## tomcat2
    Alias /bms2 "/home/hso100/tomcat2/webapps/bms/"
    Alias /cloudfolder2 "/home/hso100/tomcat2/webapps/cloudfolder/"
    Alias /contact2 "/home/hso100/tomcat2/webapps/contact/"
    Alias /directory-web2 "/home/hso100/tomcat2/webapps/directory-web/"
    Alias /hscalendar2 "/home/hso100/tomcat2/webapps/hscalendar/"
    Alias /square2 "/home/hso100/tomcat2/webapps/square/"
    Alias /wma2 "/home/hso100/tomcat2/webapps/wma/"
    Alias /hbbs2 "/home/hso100/tomcat2/webapps/hbbs/"
    Alias /hcop2 "/home/hso100/tomcat2/webapps/hcop/"

그리고 다시 확인해보면 80포트httpd로 정상적으로 열려있음을 확인 가능하다.

profile
개발자로 거듭나기!

0개의 댓글