| Apache Auto Index - 파일명 안 잘리고, 깔끔하게 (글 fencer) | 작성일 : 2003/11/08 20:49 |
| 조회수 : 7296 |
|
출처 : PHPSCHOOL, http://www.phpschool.com/bbs2/inc_view.html?id=8727&code=tnt2 --------------------------------------------------------------------- 글쓴이:Fencer Apache Auto Index - 파일 이름 안 잘리고, 좀 더 깔끔하게 조회수:1272 http://www.phpschool.com/bbs2/photo/autoindex.jpg Apache의 mod_autoindex 을 사용하여 - 파일 이름이 길 경우 잘려 보이는 문제 해결 - 기본 정렬 순서 조정 - 조금 더 깔끔한 모양 하는 과정의 예제입니다. 자료 디렉토리를 외부에 개방할 경우를 위한 거죠. 자세한 것은 당연히 매뉴얼을 참고하셔요. ^ ^; http://httpd.apache.org/docs/mod/mod_autoindex.html [ 가정 ] - Apache 1.3.10 이상 (버전에 따라 일부 옵션은 사용법이 약간 다른 경우가 있음) - DocumentRoot는 /home/mysite/ - 자료 디렉토리는 /home/mysite/data/ [ 설정 과정 ] 우선 apache/conf/httpd.conf 를 수정합니다. <Directory "/home/mysite/data/"> # 기본적으로 Indexes가 활성화되어 있어야 합니다. Options Indexes # NameWidth를 *로 해서 특정 길이에서 잘리는 것을 방지합니다. IndexOptions +IgnoreCase +DescriptionWidth=* +NameWidth=* +IconWidth=18 +IconHeight=18 # 기본 정렬 순서를 생성날짜의 역순으로 조정합니다. IndexOrderDefault Descending Date # CSS 를 적용하기 위한 Header 파일 경로 지정 (DocumentRoot에 대해 상대적) HeaderName /HEADER </Directory> DocumentRoot 인 /home/mysite/ 에 HEADER라는 파일을 만들고 읽기 권한을 줍니다. hr, pre, a 등의 태그를 주의해서 조정합니다. 특히 mod_authindex는 pre 태그를 사용하므로 pre에 조심해야 합니다. 그리고 table을 사용하지 않으므로 글꼴은 가급적 고정폭 글씨체로 지정하는 게 좋겠죠. 맨 위에 html이라는 명시를 해준 것은 버전 1.3.6 이상에서 URI로 처리-삽입되기 때문입니다. <html> <style type=text/css> <!-- body, td {font-size:9pt; color:#333333; line-height:18pt; font-family:굴림체,Arial,verdana} pre {font-size:9pt; font-family:굴림체,Arial,verdana; line-height:18pt; margin-top:0px; margin-bottom:0px;} a:link, a:visited {color:#333333; text-decoration:underline} a:hover, a:active {color:#FC8B05; text-decoration:underline} hr {height:1; color:#555555; margin-top:15px; margin-bottom:15px} --> </style> </head> Apache를 다시 구동합니다. apache/bin/apachectl graceful 브라우저를 통해 접근해 보면 위에 링크한 그림처럼 나옵니다. --------------------------------------------------------------------- 여기서 부터는 댓글 Fencer 이런 닭짓의 필요성은 기본 Index의 모양, 길이 잘리는 것과 비교해 보면 느껴지실 겁니다. ㅡ.ㅡ;;; 03/16 18:07:17 Fencer 참 모듈 중에 index를 table로 만들어주는 것도 있죠. 어디서 만든 모듈인지는 모르겠는데 찾아보면 있습니다. 필요에 따라 사용하시길... ^ ^; (저는 가급적 기본 모듈, 가벼운 것을 선호해서...) 03/16 18:10:54 DukeEYS IndexOptions +SuppressHTMLPreamble +IgnoreCase +DescriptionWidth=* +NameWidth=* +IconWidth=18 +IconHeight=18 이렇게 해주면 더 좋겠죠? SuppressHTMLPreamble 이 옵션은 아파치 기본 HTML 모듈을 무력화 시킵니다.... 10/17 8:31:18 |
|||||||||
|
|