Search
💻

Apache 아파치 서버 이전 후 한글이 깨지는 증상 해결법

이러한 현상은 charset 설정이 안되어서 그럴 경우가 많다.
[파일경로]
/etc/apache2/conf-available/charset.conf
# Read the documentation before enabling AddDefaultCharset. # In general, it is only a good idea if you know that all your files # have this encoding. It will override any encoding given in the files # in meta http-equiv or xml encoding tags. # AddDefaultCharset UTF-8 # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Shell
복사
파일경로를 열어보면 위 내용이 있는데
# AddDefaultCharset UTF-8
Shell
복사
이 내용을 주석 해제 처리 하면 된다.
AddDefaultCharset UTF-8
Shell
복사
주석을 해제하고 서버를 리부트 하거나 리로드 하면 된다.
$ service apache2 restart or $ service apache2 reload
Shell
복사
Last updated @3/30/2023
Copyright 2023, 실전코딩 All Rights Reserved.