I am trying to get a simple apache stack running and came across something I have not seen before. This is an AWS instance running the Bitnami LAMP stack. If I create an incomplete html file as:
Apache is prepending to the response. E.g.
I am serving an angular2 app from this stack and loading of the component templates is failing since they are being seen as malformed. Does anyone know what apache setting or module might be doing this?
PageSpeed is the one that's adding that
<head/>. PageSpeed is enabled by default on the Bitnami LAMP Stack.
This is added by the default mod_pagespeed add_head filter. You can disable it adding the line below to
However, note that this filter is needed for many other filters which will only write contents in the element.
You can also disable PageSpeed as explained in the guide below to check that the header disappear: https://docs.bitnami.com/aws/infrastructure/lamp/#how-to-disable-the-cache-in-the-server
Answer author Juan
Tickanswer.com is providing the only single recommended solution of the question Seeing rogue output on a basic apache stack under the categories i.e apache , apache2 , bitnami , . Our team of experts filter the best solution for you.