Custom Apache 404 page
I found the answer myself.
You have to edit the file /etc/apache2/conf.d/localized-error-pages
sudoedit /etc/apache2/conf.d/localized-error-pages
You can enter plaintext or link to a script or html
<VirtualHost 192.168.0.1:80>
ServerAdmin [email protected]
ServerName host.ru
ServerAlias www.host.ru
DocumentRoot /home/WebServer/www/host.ru/public_html/
ErrorLog /home/WebServer/www/host.ru/logs/error.log
CustomLog /home/WebServer/www/hostu/logs/access.log combined
Alias /error_html/ "/home/WebServer/www/host/error_html/"
<Directory "/home/WebServer/www/host.ru/error_html">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en cs de es fr it nl sv pt-br ro
ForceLanguagePriority Prefer Fallback
</Directory>
ErrorDocument 404 /error_html/HTTP_NOT_FOUND.html
</VirtualHost>