Skip to content

조회 수 16291 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
제  목 : Apache의 Indexes된 페이지에서 한글표시
작성자 : 좋은진호(truefeel, http://coffeenix.net/ )
작성일 : 2008.3.25(화)
정리일 : 2008.4.9(수)

Apache 설정시 가장 먼저 없애는 설정중의 하나가 Options Indexes 이다. Indexes 설정이 되어 있고 해당 디렉토리에 index.html, index.php 등 DirectoryIndex에서 지정한 파일이 없다면, 해당 디렉토리의 파일 목록이 나열된다. 의도적으로 파일목록을 보여줘야하는 경우가 아니면, 보안을 위해서 빼주는게 좋다. http://www.ibiblio.org/pub/ 은 파일 제공등을 목적으로 Indexes 로 설정된 경우이다.

 
<Directory "...">
        Options Indexes -MultiViews
</Directory>
 
apache_indexes.png

주위 분이 Indexes를 필요해서 설정했는데, 한글파일이나 디렉토리가 깨진다는 말씀을 하셨다. Indexes를 사용하지 않는 관계로 몇가지 테스트와 설정을 찾아본 결과 apache 문서에서 답을 찾았다.



Apache Module mod_autoindex
http://httpd.apache.org/docs/2.2/en/mod/mod_autoindex.html#indexoptions

 
Charset=character-set (Apache 2.0.61 and later)
    The Charset keyword allows you to specify the character set of the generated page. The default is either ISO-8859-1 or UTF-8, depending on whether the underlying file system is unicode or not.
    Example:

    IndexOptions Charset=UTF-8
 


Apache 2.0.61 이후(2.2.x포함)에서 문자셋을 지정하는 설정이 추가었으며, 설정하지 않을 경우 ISO-8859-1 또는 UTF-8로 된다. 테스트결과 ISO-8859-1 으로 표시되었다. 따라서 EUC-KR로 인코딩된 파일명은 다음과 같은 설정을 추가해주면 된다.

 
IndexOptions Charset=euc-kr
 
apache_indexes_charset.png



<설정예제>
<VirtualHost *:80>
     DocumentRoot /home/source
     ServerName source.ysy2080.com
<Directory "/home/source">
     Options Indexes
     AllowOverride Indexes Authconfig
     IndexOptions FancyIndexing VersionSort FoldersFirst NameWidth=*:80
     Order allow,deny
     Allow from all
     IndexOptions Charset=euc-kr
</Directory>
</VirtualHost>



출처 : coffeenix.net

List of Articles
번호 제목 글쓴이 날짜 조회 수
68 apache 설치시 에러 발생 collect2: ld returned 1 exit s... ADMINPLAY 2013.03.12 9811
67 apache 에서 euc-kr홈페이지를 포팅할때 화면이안나올경우 ADMINPLAY 2009.07.18 14217
66 Apache 에서 최대 접속자 수 늘리기 ADMINPLAY 2012.07.30 14405
65 apache 외부링크 차단 ADMINPLAY 2010.08.31 21221
64 Apache 웹서버 MaxClient 최대값 조정을 위한 C & CPP 플... ADMINPLAY 2009.06.21 13815
63 Apache 웹페이지 한글깨짐, AddDefaultsCharset 설정 file ADMINPLAY 2009.01.03 30520
62 Apache 최적화 ADMINPLAY 2008.11.11 15769
61 apache, tomcat 가상디렉토리 설정 file ADMINPLAY 2010.09.17 23003
60 apache2 worker 방식 client 수치 설정법 ADMINPLAY 2009.11.26 16069
59 Apache: client denied by server configuration ADMINPLAY 2010.10.25 21665
58 apache가 worker 모드인지 prefork 모드로 동작하는지 확인 1 file l2zeo 2013.01.21 17467
» Apache의 Indexes된 페이지에서 한글표시 file ADMINPLAY 2009.05.07 16291
56 APM + Snort + ADODB + BASE + oinkmaster 설치 l2zeo 2010.05.29 20816
55 APM 기본설치후 아파치 실행에러 httpd: Could not determ... ADMINPLAY 2009.08.08 21875
54 APM설치 후 80포트가 연결이 안되요....ㅜㅜ 1 kimbongsoo 2013.02.14 9803
53 AWSTATS 국가별 사용자 분석 ADMINPLAY 2008.12.25 14463
52 AWSTATS 설치 ADMINPLAY 2008.12.25 23731
51 CentOS 5.X 에 MRTG설치 할때 한글 문제 ADMINPLAY 2014.06.06 6878
50 CGI 오류: Premature end of script headers (Internal Se... 1 ADMINPLAY 2008.12.14 14127
49 CGI 퍼미션 으로 웹페이지 열리지 않음 ADMINPLAY 2009.01.12 14674
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234