How to read compressed Apache docs

One of the great things about Debian/Ubuntu is the consistency with which system documentation is placed in /usr/share/doc/

Assuming you have a web server installed this documentation is then available at http://localhost/doc/

But to keep filesize down - many files are compressed and have to be decompressed before you can read them.

The browser can actually do that compression on the fly - if it receives the right headers - what it needs to be told is that the content is compressed plain text.

To achieve this add the following lines to your default apache config for the docs directory (there should already be a docs section)

<Directory "/usr/share/doc/">
AddEncoding x-gzip gz tgz
AddType text/plain .gz
</Direcory>

Tags

Post new comment

Got something to add - just enter a comment
all other fields are optional.

Your email address will not be published.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.