We have answer of your question!

100% solved queries, no empty question

Question: Seeing rogue output on a basic apache stack


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:

<h1>Something Here</h1>

Apache is prepending to the response. E.g.

<head/><h1>Something Here</h1>

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?


Question author Andrew-rutter | Source



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 /opt/bitnami/apache2/conf/pagespeed.conf:

ModPagespeedDisableFilters add_head

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.

Related Search Queries:

You may also add your answer

Thanks for contributing an answer to Tick Answer!