Skip to content

조회 수 16293 추천 수 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 2.2.17 (mod_url 하고 mod_rewrite 충돌) file ADMINPLAY 2011.08.18 20398
67 트래픽분석툴(mod_throttle) 설치 및 설정 - apache1.3.x ... file ADMINPLAY 2010.05.03 20021
66 KeepAlive 설정 및 정의 ADMINPLAY 2012.01.16 19893
65 Apache 2.2.21 패치 (mod_proxy_ajp 패치와 apache killer... ADMINPLAY 2012.01.16 19643
64 [Apache] MPM(Prefork VS Worker) ADMINPLAY 2012.01.16 19641
63 apache + oracle (오라클 DB 한글깨짐) ADMINPLAY 2010.02.24 19596
62 아파치 컴파일 에러(apr-util) configure: error: cannet ... ADMINPLAY 2009.08.08 19576
61 apache server 2.2, Tomcat5.5 로드밸런싱 및 클러스터 ADMINPLAY 2009.12.10 19122
60 mod_gzip, mod_deflate ADMINPLAY 2010.07.29 19119
59 아파치 2.X 버전에서 mod_cband를 이용한 트래픽관리 file ADMINPLAY 2009.01.17 19036
58 아파치(apache) 무단 링크 방지 ADMINPLAY 2011.06.18 18979
57 웹방화벽 ModSecurity 룰적용 순서 file l2zeo 2010.05.29 18918
56 Apache - 도메인 포워딩 ADMINPLAY 2010.08.26 18809
55 아파치 GeoIP를 이용한 국가별 제한 ADMINPLAY 2010.01.30 18790
54 xcache 설치 (xcache-1.2.2.tar.gz) file ADMINPLAY 2009.03.17 18364
53 squid 로 웹서버 가속하기..---== 강추 ==--- ADMINPLAY 2009.11.26 18256
52 Apache Make시 /usr/lib/libexpat.so: could not read sym... ADMINPLAY 2009.08.07 17945
51 (간단한 팁) 우분투에 Apache2 설치하기 ( apt-get ) 로키 2012.04.01 17608
50 apache가 worker 모드인지 prefork 모드로 동작하는지 확인 1 file l2zeo 2013.01.21 17473
49 아파치에서 한글 파일 읽기 [mod_url 설치] file ADMINPLAY 2009.03.17 17299
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234