How to change Apache default charset?

Created:

2016-11-16 13:12:24 UTC

Modified:

2017-08-16 16:08:59 UTC

3

Was this article helpful?


Have more questions?

Submit a request

How to change Apache default charset?

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux

Symptoms

How to change a character set in Apache configuration, e.g. from UTF-8 to ISO-8859-1 ?

Resolution

  • To change default charset server-wide, open /etc/httpd/conf/httpd.conf file and edit the AddDefaultCharset line:

        AddDefaultCharset ISO-8859-1
  • To change default charset for subscription:

  • Open subscription settings, go to Apache & Nginx Settings section.

  • Add to Additional directives for HTTP and Additional directives for HTTPs :

        AddDefaultCharset ISO-8859-1
  • Add to Additional nginx directives:

        charset iso-8859-1;
  • Go to PHP settings of subscription, add to additional directives:

        default_charset = "iso-8859-1"
Have more questions? Submit a request
Please sign in to leave a comment.