편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
1번째 줄: | 1번째 줄: | ||
==개요== | |||
;아파치 기본캐릭터셋 UTF-8 설정 | ;아파치 기본캐릭터셋 UTF-8 설정 | ||
==확인== | ==확인== | ||
;실제 동작 확인 | ;실제 동작 확인 | ||
< | <source lang='cli'> | ||
root@zetawiki:~# echo hello > /var/www/html/greet.html | root@zetawiki:~# echo hello > /var/www/html/greet.html | ||
root@zetawiki:~# curl -s -I http://localhost/greet.html | root@zetawiki:~# curl -s -I http://localhost/greet.html | ||
17번째 줄: | 15번째 줄: | ||
Content-Length: 6 | Content-Length: 6 | ||
Content-Type: text/html | Content-Type: text/html | ||
</ | </source> | ||
:→ 헤더에 캐릭터셋 정보 없음 | :→ 헤더에 캐릭터셋 정보 없음 | ||
;설정 파일 확인 | ;설정 파일 확인 | ||
< | <source lang='cli'> | ||
root@zetawiki:~# grep DefaultCharset /etc/apache2/conf-enabled/charset.conf | root@zetawiki:~# grep DefaultCharset /etc/apache2/conf-enabled/charset.conf | ||
# Read the documentation before enabling AddDefaultCharset. | # Read the documentation before enabling AddDefaultCharset. | ||
#AddDefaultCharset UTF-8 | #AddDefaultCharset UTF-8 | ||
</ | </source> | ||
:→ 주석처리되어 있음 | :→ 주석처리되어 있음 | ||
==charset.conf 수정== | ==charset.conf 수정== | ||
*/etc/apache2/conf-enabled/charset.conf 파일에 있는 UTF-8 설정 주석 해제 | */etc/apache2/conf-enabled/charset.conf 파일에 있는 UTF-8 설정 주석 해제 | ||
< | <source lang='cli'> | ||
root@zetawiki:~# vi /etc/apache2/conf-enabled/charset.conf | root@zetawiki:~# vi /etc/apache2/conf-enabled/charset.conf | ||
</ | </source> | ||
< | <source lang='autoconf' highlight='6'> | ||
# Read the documentation before enabling AddDefaultCharset. | # Read the documentation before enabling AddDefaultCharset. | ||
# In general, it is only a good idea if you know that all your files | # In general, it is only a good idea if you know that all your files | ||
42번째 줄: | 40번째 줄: | ||
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet | ||
</ | </source> | ||
==같이 보기== | ==같이 보기== | ||
*[[아파치 DefaultCharset 확인]] | *[[아파치 DefaultCharset 확인]] | ||
*[[/etc/apache2/conf-enabled/charset.conf]] | *[[/etc/apache2/conf-enabled/charset.conf]] | ||
[[분류: 아파치]] | [[분류: 아파치]] | ||