Update auth.php with LDAP option to specify port
[racktables-incomplete-works] / README.Fedora
1 RUNNING RACKTABLES ON A FEDORA SYSTEM
2 =====================================
3
4 Most files in Fedora package of RackTables application reside in the
5 /usr/share/RackTables directory regardless of package version. It is
6 assumed, that this directory is never directly used in httpd's "document
7 root" setting. Instead a symlink or a PHP "require" construct should be
8 used for the index.php (and ONLY index.php) file based on some other
9 directory, which is actually used as wwwroot. This greatly improves
10 security and allows for the two use cases described below.
11
12 1. Single RackTables instance per server. By default the application
13 expects its configuration file (secret.php) in /etc/RackTables directory,
14 which is a part of the RPM. In a fresh installation the files is missing,
15 no MySQL database is setup and there is no symlink.
16
17 Setting up the symlink is simple: one needs to decide on the URL of the
18 RackTables system and map it to filesystem path. For example, the commands
19 below are likely to enable access through "http://localhost/racktables/":
20
21 # mkdir /var/www/html/racktables
22 # ln -s /usr/share/RackTables/wwwroot/index.php /var/www/html/racktables
23
24 After that opening the URL in a browser will bring up RackTables installer,
25 which will fill in /etc/RackTables/secret.php file and the contents of the
26 MySQL database. After that the setup is complete.
27
28
29 2. Multiple RackTables instances per server. The application is designed
30 to be able to serve many independent MySQL databases with the same
31 codebase, but different configuration files. This requires a separate
32 config directory per each instance. Each of the directories will feature
33 an own secret.php file configured for its own MySQL database.
34
35 For example, 3 virtual hosts should provide an independent RackTables
36 application each. It is assumed, that httpd is already configured for the
37 virtual hosts using respective directories:
38
39 /var/www/vhosts/racktables.example1.com
40 /var/www/vhosts/racktables.example2.com
41 /var/www/vhosts/racktables.example3.com
42
43 The configuration directories could be:
44
45 # mkdir /etc/RackTables/example[123]
46
47 The "wwwroot" directories will require a short PHP wrapper file each. The
48 wrappers will differ only in the value of $racktables_confdir setting:
49
50 # cat > /var/www/vhosts/racktables.example1.com/index.php <<<EOF
51 <?php
52
53 $racktables_confdir = '/etc/RackTables/example1';
54 require '/usr/share/RackTables/wwwroot/index.php';
55
56 ?>
57 EOF
58
59 Once the wrapper files are installed, setup of each instance must be
60 completed independently through the HTTP installer. Once this is done,
61 every instance can be independently maintained, backed up and even deleted.