0

I have configured a basic virtual host just to be able to list a specific directory on the server. For the local files it’s working perfectly, but one of the folder listed at the root is a symlink to a folder outside DocumentRoot. The listing of the directories inside the symlink works fine as well, but if I try to download a file or view an image here comes the issue. The client (browser, curl, …) does’t see a response header, because it is malformed. Here’s an example:

 11:57:54 GMT
ETag: "352c59-5ce9f41529407"
Accept-Ranges: bytes
Content-Length: 3484761
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: image/jpeg

So this malformed header is prepended to the file which corrupts the data. Any idea on how to make apache send a proper header?

EDIT: I tried with the official httpd Docker image, replacing the symlink by a docker volume in the container, and it lead to the exact same effect.

gregseth
  • 193
  • 2
  • 8

1 Answers1

0

Answer and explanation found here: apache2 sends corrupt responses when using a cifs-share

TL;DR
Add EnableMMAP off to your apache2.conf file

gregseth
  • 193
  • 2
  • 8