Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with my Apache Webserver, I got 2 environments: Development and Production. Both have the same configuration, but the first one sends the HTMLs exactly as they've been created, the second one doesn't send exactly the same file. They omit whitespaces, comments, and other chars that for a browser doesn't care, but if my app generate hash from this files and the apache changes the file, the hash won't be the same.

I've been looking for the differences but I nothing appears. Any suggestion?

My apache2 config

<VirtualHost *:80>
ServerName XXX
ServerAlias XXX XX.XX.XX.XX
DocumentRoot /var/www/
<Directory />
        Options FollowSymLinks
        AllowOverride None
<Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
        ErrorLog /var/log/apache2/api-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel info

        CustomLog /var/log/apache2/api-access.log "%h %t %T %D %m %X %U"

        # Timestamp | bytes Downloaded | bytes Uploaded | PlayerID | IP | URL
        CustomLog /var/log/apache2/traffic-access.log "%{%s}t|%O|%I|%{Referer}i|%a|%U"
        ServerSignature On
        Alias /img/screenshots  /dev/shm/screenshots
        #Alias /videos /mnt/STORAGE/videos
        Alias /awstats-icon/ /usr/share/awstats/icon/
        ScriptAlias /aw-api-stats/ /usr/lib/cgi-bin/

        <Location /server-status>
           SetHandler server-status
           Allow from all 
ExtendedStatus On

This is my production config file and the modules enabled are the following with default values:

alias.conf authz_groupfile.load cgi.load env.load php5.conf setenvif.conf alias.load authz_host.load deflate.conf mime.conf php5.load setenvif.load auth_basic.load authz_user.load deflate.load mime.load reqtimeout.conf status.conf authn_file.load autoindex.conf dir.conf negotiation.conf reqtimeout.load status.load authz_default.load autoindex.load dir.load negotiation.load rewrite.load


share|improve this question

can't be specific without knowing your configuration, but your production environment is set up to use a HTML minifier. You'll need to dig through your configuration to put exceptions to the pages that you don't want Apache to minify. Check what installed modules you have on your web server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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