Note that there are some explanatory texts on larger screens.

plurals
  1. POapache .gz gzip content handler for Linux documentation /usr/share/doc and localhost/doc/
    text
    copied!<p>How could I create a simple content handler for apache .gz gzip content. I want it to uncompress say <a href="http://localhost/doc/FAQ/Linux-FAQ.gz" rel="nofollow">http://localhost/doc/FAQ/Linux-FAQ.gz</a> and send it to the browser as plain text. There is a lot of documentation for Linux in /usr/share/doc and localhost/doc/. I don't want to use zless, zcat or vim to read the content. I use apache to browse the documentation on my local machine and have my web browser revive it as standard text so that it does not ask me to download the *.gz file every time. </p> <pre><code>Alias /doc/ "/usr/share/doc/" Alias local.doc "/usr/share/doc/" &lt;Directory "/usr/share/doc/"&gt; Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 &lt;/Directory&gt; </code></pre> <p>But Now I want all those .gz file under /usr/share/doc/ to be servered as plain text. I think I could do that very simply with a python script in cgi-bin. I am looking for a nice content handler for those files. Like the way it php files are handled .gz should be uncompressed and sent to the browser. </p> <pre><code>&lt;IfModule mod_php5.c&gt; AddType application/x-httpd-php .php .phtml .php3 AddType application/x-httpd-php-source .phps &lt;/IfModule&gt; LoadModule php5_module /usr/lib/apache2/modules/libphp5.so </code></pre> <p>I see there is a mod_deflate, how would this apply. Could this handle the gzip content. </p> <p>It would make browsing documentation so much easier. Any programing resources to help here would be nice. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload