0

Apache2 successfully streams pre-compressed content on my Mac's installation. I can use files like index.gz, textfile.gz, etc and they all load fine in a browser.

But when I try to create the same configuration on other Apache environments like Ubuntu and CentOS installs, the gzip content never renders in the browser; it's always downloaded as a file.

It's the AddEncoding directive config that succeeded in streaming files from the OSX Apache install, specifically the changes recommended here: https://stackoverflow.com/a/609051/1074464. If I turn off those directives, it will fail and defer to downloading again. As in that example, the OSX install uses /etc/apache2/httpd.conf for these directives, but the other distros use /etc/apache2/apache2.conf and its many includes of the virtual hosts sub files. I've made the AddType and AddEncoding updates in about every location I can think of including:

/etc/apache2/sites-enabled/000-default
/etc/apache2/httpd.conf
/etc/apache2/apache2.conf
/etc/apache/mods-enabled/mime.conf

As you can see from the shotgun troubleshoot approach I'm not clear on where/if/in what order I need to specify these directives. I thought I'd covered all possible locations, but maybe there is another or perhaps a directive I'm not seeing on the Linux systems is stepping on the ones I've configured?

TIA

1 Answer 1

0

After comparing the working and non-working installs on virtually a file-by-file basis, I found this entry in the broken Linux install's /etc/mime.types:

application/x-gzip              gz

Commenting resolved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.