728x90
반응형
# html 페이지 한글 깨짐
linux에서 apach2 / httpd 로 html페이지를 띄우면 한글이 깨지는 경우가 발생한다.
locale의 LANG을 바꾸면 되지만 다른 설정들의 영향을 줄 수 있다.
이에 따라 페이지 설정만을 바꾸는 방법을 남긴다.
반응형
# apache2
/etc/apache2/apache2.conf 수정
AddDefaultCharset UTF-8
>
#AddDefaultCharset UTF-8
위 수정후에도 동일하다면 아래의 파일도 확인.
/etc/apache2/conf-available/charset.conf
AddDefaultCharset UTF-8
>
#AddDefaultCharset UTF-8
# httpd
/etc/httpd/conf/httpd.conf 수정
AddDefaultCharset UTF-8
>
#AddDefaultCharset UTF-8
728x90
# 서비스 재시작
각 파일을 수정한 후 해당서비스를 재시작해 적용한다.
systemctl restart apache2
or
systemctl restart httpd
728x90
반응형
'Linux' 카테고리의 다른 글
[Linux] sed 명령어 (0) | 2024.11.25 |
---|---|
[Linux] pam_unix(sudo:auth): conversation failed, auth could not identify password for [service] (0) | 2024.09.27 |
[Linux] Curl error 60 SSL peer certificate or SSH remote key was not OK (0) | 2024.09.12 |
[Linux] /etc/fstab 설정 자동 마운트 (0) | 2024.09.10 |
[Linux] Samsung disk + AMD cpu I/O error "libata.force=noncq" (0) | 2024.06.30 |