BLog

ImprintImpressum
PrivacyDatenschutz
DisclaimerHaftung
Downloads 

FreeBSD: Documentation of the installed 3rd-party software at your fingertips

Many third-party software which is installed by FreeBSD's ports system or by other means, place some kind of documentation into the directory /usr/local/share/doc. A lot of the ports come with a very well elaborated documentation, for example Apache, Postfix, MPD5, PostgreSQL, GraphicsMagic, PCRE, DB5, etc., while others are not as complete, but in most cases at least leave a pointer where to look else. In case, an Apache web server is running at the very system, it is quite easy to let Apache generate an index page of the said documents, which would allow easy access by a web browser.

In the virtual host definition of Apache for my local site, I got:

Alias /manuals "/usr/local/share/doc"
<Directory "/usr/local/share/doc">
   AllowOverride      All
   Options            Indexes
   AuthType           Digest
   AuthName           Manuals
   AuthDigestProvider file
   AuthUserFile       "/usr/local/etc/apache24/manualusers.passwd"
   Require            valid-user
</Directory>

In order to create the password digest file of the HTTP Digest authentication for accessing the manuals, execute the following command:

htdigest -c /usr/local/etc/apache24/manualusers.passwd Manuals "user name"

In order to add more users, use the same command without the -c flag:

htdigest /usr/local/etc/apache24/manualusers.passwd Manuals "other name"

Restart Apache and point the web browser to the URL (let's assume the domain name is example.com) http://example.com/manuals/. There should be a prompt for entering credentials. After successful authentication, Apache should generate a list of the available documentation of the installed 3rd-party software, which is presented then by the way of the web browser.

Copyright © Dr. Rolf Jansen - 2018-07-14 11:11:18

PROMOTION