The last task is to configure your web server.
Instructions below are given for Apache
and lighttpd servers.
Apache web server
INSTALL document in previous versions of LXR told to
edit httpd.conf.
This presents serious drawbacks.
A better approach is taken with 0.11 release.
The pre-configuration step created a
lxrconf.d/apache-lxrserver.conf to be copied
into /etc/httpd/conf.d/
.
It is automatically read at server initialisation
and merged with httpd.conf.
Whenever the server software is updated,
all you have to do is store again this file in the
/etc/httpd/conf.d/
directory.
Access to the /etc/httpd/conf.d/
directory requires root privileges.
Copy the file to the Apache configuration directory:
$ cp lxrconf.d/apache-lxrserver.conf /etc/httpd/conf.d
This file is valid both for Apache version
1.x
and version
2.x.
The "per-directory" configuration file .htaccess has been
created by the pre-configuration step
and is already stored in the LXR root directory.
Edit it to enable directory listing or apply other personal preferences.
lighttpd web server
Pre-configuration step created a
lxrconf.d/lighttpd-lxrserver.conf to be used as the
configuration file basis for LXR.
Review and edit this file.
lighttpd operation is module-oriented:
the needed modules must be loaded by the configuration file.
A minimal set of modules is listed in file
templates/lighttpd/lighttpd-lxr-modules.conf.
If more modules are needed,
copy file lighttpd-lxr-modules.conf to lxrconf.d/
directory, edit it and change a directive in the configuration file.
Scroll down to section Load the modules to check
the include
directive.
include "/LXR_root_directory/lxrconf.d/lighttpd-lxr-modules.conf"
LXR-specific configuration is located at the end of the file in
LXR section.
Uncomment $HTTP
directive.
Duplicate it for as many host names you defined.
Replace string host_name
by your host names.
Example:
$HTTP["host"] == "192.168.1.1" {
server.document-root = "/usr/local/share/lxr/"
}
Check the configuration file:
$ lighttpd -t -f lxrconf.d/lighttpd-lxrserver.conf
Launch lighttpd web server.
If you already operate a lighttpd server,
merging LXR with global configuration is left to you as an exercice.
In case you later encounter difficulties with SELinux
(security alerts related to the LXR root directory)
Scripts and their directories must be specifically labeled to identify them
as executing code as a "normal" context.
This is routinely done
when they are located in /var/www/cgi-bin/.
To eliminate alerts, the most reliable method is to clone
/var/www/cgi-bin/ context with the following command:
$ chcon --reference /var/www/cgi-bin -R LXR_root_directory/
Fire up your webbrowser and go to http://localhost/lxr/source
.
You should see the content of the directory of the default version
for your tree.