Quick bandwidth optimisation tips for Apache and PHP

Here’s a quick tip to optimise the HTTP response headers sent by your webserver. While being pretty useless to the average user, the Server signature and powered-by headers could be removed or at least reduced. Obviously these changes are only minor, but on a heavily loaded server such as large forums, could make a decent little saving.

These two little changes…

apache2.conf

ServerTokens Prod

php.ini

expose_php = Off

Will change the HTTP response headers on this server from:

Server: Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16 \
mod_ssl/2.0.54 OpenSSL/0.9.7e mod_perl/1.999.21 Perl/v5.8.4
X-Powered-By: PHP/4.3.10-16

To:

Server: Apache

That’s a saving of 128 bytes. This site has served 2025 requests so far this month, so this little trick might only have saved me 253kB, but what if there had been 20,000,000 requests?

payday loans cash advance needs

  • Digg
  • del.icio.us
  • NewsVine
  • Reddit
  • Furl
  • description
  • StumbleUpon
  • Technorati

4 Responses to “Quick bandwidth optimisation tips for Apache and PHP”

  1. Alain Says:

    Why wouldn’t you just set ServerSignature off in httpd.conf?

  2. daveyboy Says:

    As far I know, ServerSignature only controls the signature on the bottom of error pages or index listings?

    ServerSignature

  3. Jourgenz Says:

    It’s test.
    I could’t post a message…

  4. werutzb Says:

    Hi!

    I would like make better my SQL experience.
    I red that many SQL books and want to
    read more about SQL for my work as mysql database manager.

    What would you recommend?

    Thanks,
    Werutz

Leave a Reply