First install Apache2
$ sudo apt-get install apache2 apache2-docapache2-doc is the special case here. It allows you to browse your documentation /usr/share/doc/ through your web browser. from
http://localhost/doc/
This does not work out right though. you need to change the configuration of apache to get it to decompress and show the *.gz files as plain text.
I posted on Stackoverflow to get a way to use the apache to show the content of *.gz documents in the /usr/share/doc/ directory. This is what was posted as possible solution
http://stackoverflow.com/questions/5242106/apache-gz-gzip-content-handler-for-linux-documentation-usr-share-doc-and-local
Here are those instructions in brief. It tells apache how to deal with .gz files to process them as plain text and send them to the browser as plain text.
sudo a2enmod headers sudo a2enmod deflate gksu gedit /etc/apache2/sites-enabled/000-defaultGo to the bottom of the file and find the section with Alias /doc/ "user/share/doc/" and change it to look like this.
Alias /doc/ "/usr/share/doc/" <Directory "/usr/local/doc"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 AddEncoding gzip gz <FilesMatch "\.gz$"> ForceType text/plain Header set Content-Encoding: gzip </FilesMatch> </Directory> sudo apache2ctl restartNow you are done and can read your *nix documentation that comes with most packages.
4 comments:
You need to edit your posting - the bracketed directory clause is missing:
<Directory "/usr/local/doc">
bulk of your conf insert
</Directory>
It's obvious to anyone who spends much time editing apache configs, but Joe user might miss it.
For some reason, blogger is removing any thing that looks like a html tag, I will keep trying to get it to show correctly.
In my reply, I entered the brackets using gt and lt html constructs, but you should be able to simply encapsulate your config file block in an html pre tag.
Thanks Sean, That worked. blogger is not a fan of pasting plain text. It took me about 10 tries to get it to look like the composer once it was posted.
Post a Comment