nginx and incomprehensible numbers before

    After installing nginx as a frontend to apache, I encountered a problem: at the beginning of some html-documents, a hexadecimal number was inserted, and in the end it was zero. The problem only appeared on CMS Drupal error pages.
    Essentially, these documents are nothing more than chuncked server responses. After a short trial, I found out that such a problem is encountered due to a crooked php code. On an HTTP / 1.0 request, the php code returned an HTTP / 1.1 response. I did not want to get into the Drupal code, so I decided to tweak apache (2.2) a bit. He added the following lines to httpd.conf: After which, of course, he restarted apache.

    
    BrowserMatch ".*" downgrade-1.0 force-response-1.0
    




    In fact, I don’t know exactly what these settings mean, but I assume that now the browsers for my site will exclusively use the HTTP / 1.0 protocol. After carefully checking the site’s performance, I was convinced that everything was working well and calmed down :)

    UPD: It ’s actually very difficult to identify those responsible for what happened. But for me it is important that the Apache configuration described above completely solves the problem.

    Also popular now: