After installing nginx as a frontend to apache, there was a problem: at the beginning of some html documents a hexadecimal number was inserted, and at the end - zero. The problem manifested itself only on pages with CMS Drupal errors.
In essence, these documents are nothing but server chuncked responses. After a brief trial, I found out that such a problem occurs because of a php-code curve. On the HTTP / 1.0 request, the php code gave an HTTP / 1.1 response. I didn’t want to go into the Drupal code, so I decided to tweak apache (2.2) a little. I added the following lines to httpd.conf:
<IfModule setenvif_module> BrowserMatch ".*" downgrade-1.0 force-response-1.0 </IfModule>
<IfModule setenvif_module> BrowserMatch ".*" downgrade-1.0 force-response-1.0 </IfModule>
Then, of course, restarted apache.
In fact, I don’t know exactly what these settings mean, but I assume that now browsers for my site will use only the HTTP / 1.0 protocol. Carefully checking the performance of the site, made sure that everything works well, and calmed down :)
')
UPD: Guilty of what happened is actually very difficult to determine. But for me it’s important that the Apache setting described above completely solves the problem.