Ubuntu 14.04, apache2 + nginx.

Nginx gives statics to the site (PHP), phpmyadmin and fully serves redmine (ROR through the passenger), everything else goes to apache sitting on port 8080 on localhost.

phpmyadmin and redmine are only available via http, the main site is http and https.

Updated with the usual apt-get update && apt-get upgrade. (There was no sadness, the updates were pumped up).

After the update, all traffic going via http goes somewhere to nowhere (nothing is visible in the logs, as if no one comes in), instead of opening the site’s page, an incomprehensible file weighing ~ 57 bytes is given, does not open with anything, gets the name based on from url. those. example.com/somefile.abr downloads as somefile.abr

Tell me where to dig. On request, in the spirit of "site downloads instead of open", I see only a bunch of questions from people who have not mastered setting up handlers for php and other scripts.

UPD
The answer is found, thanks @AlexeyTen and this post . To the answers to the question I want to add that

listen 80 http2; 

even in the config of one of the sites changes the behavior of each of them, which is strange.

  • What logs can not see anything? nginx or apache? Static given? - MAN69
  • What are the headers with the file? - Pavel Mayorov
  • Here and there. Statics on the main site via https is given, in the same phpmyadmin it is not given (tried to open direct links to the logo or other pictures, the result is the same). I can give links to sites or configs if it helps, but they are generally typical. How to see with what headers file is given? - Viktor Izhokin
  • one
    Start by finding out whether the requests go to your computer, and whether the process nginx responds to them. - aleksandr barakin
  • How to see with what headers file is given? - for example: $ wget -S --spider url - aleksandr barakin

1 answer 1

The problem was in the http2 flag of the listen directive in the next server block.

Somewhat unobvious, but despite the fact that listen declared inside the server block, its flags can affect other server blocks that listen to the same port.

For example:

 server { listen 80; server_name server1; } server { listen 80 http2; server_name server2; } 

here server1 will also try to accept requests via the http2 protocol. It is especially difficult to detect such an error when the blocks are separated by different files.