Add Charset to css and js files

I noticed that my css and js files were being served without the charset in the content type…

content-type: text/css;

It should be (source)…

content-type: text/css; charset=utf-8

To resolve, login to Plesk and navigate to your domain, and click Apache & nginx Settings, scroll down to Additional nginx directives and add…

charset UTF-8;
charset_types text/plain text/css text/xml application/json application/manifest+json application/javascript application/rss+xml;

as you can see, you can just list the file types as you would for gzip_types.

Horde ActiveSync on Plesk

If you’ve been running ActiveSync on a dedicated subdomain with Horde you’ve probably been relying on Apache Alias directives to get it working.
Now mod_php is deprecated, you don’t have that option.

You now have to set the handler for the /usr/share/psa-horde folder in Additional directives for HTTPS for the subdomain in Plesk.

I copied this over from the main webmail conf, the only change I made was to change PHP version to 7.4.

<IfModule mod_fcgid.c>
FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX plesk-php74-fastcgi
FcgidInitialEnv PP_CUSTOM_PHP_INI "/etc/psa-webmail/horde/horde/php.ini"
FcgidMaxRequestLen 134217728
FcgidPassHeader Authorization
<Directory "/usr/share/psa-horde">
<Files ~ (\.php$)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
Options +ExecCGI
</Files>
Require all granted
</Directory>
</IfModule>

I hope that helps someone.

Removing the Inbox Prefix in Dovecot

This is how you remove the Inbox Prefix server-side when using Dovecot.

Firstly let’s create the file…

nano /etc/dovecot/conf.d/10-prefix.conf

Now we need to add the following to it…

namespace inbox {
separator = .
prefix =
inbox = yes
}

Finally restart Dovecot…

service dovecot restart

And you’re done.