apacheapache2apache2.4mod-deflate

How to enable Content-MD5 tag in Apache 2.4


I just installed a sole Apache 2.4 (without any other modules like Php or what else) and intended to host static files on it. The static files are placed under /var/www/html/test-files/. I tried to enable the core ContentDigest (documented by Apache2 at Apache2 Core) by two ways:

  1. Create .htaccess under /var/www/html/test-files/ and added ContentDigest On to the file.

  2. Edit /etc/apache2/apache2.conf and added following to it: <Directory /var/www/html/test-files/> ContentDigest On </Directory>

I used Inspect feature of Google Chrome to test downloading some .html and mp4 files but couldn't see any Content-MD5 tag included in headers.

Note: all configs are default.

Do I mis-understand something here? How can I enable the tag?


Solution

  • I did solving the issue by using the second approach PLUS disabling mod_deflate:

    sudo a2dismod deflate
    sudo service apache2 restart