| | 129 | |
| | 130 | |
| | 131 | * Web server configuration |
| | 132 | |
| | 133 | In order to let your web server serve up OpenGuides correctly, you will |
| | 134 | have to tell it to recognise your installation directory as one |
| | 135 | containing CGI scripts. However you can make your URLs nicer by |
| | 136 | employing mod_rewrite as well. The following Apache configuration |
| | 137 | directives show how: |
| | 138 | |
| | 139 | Alias /myguide /usr/lib/cgi-bin/myguide |
| | 140 | <Directory /usr/lib/cgi-bin/myguide> |
| | 141 | Options FollowSymLinks Indexes ExecCGI |
| | 142 | RewriteEngine on |
| | 143 | RewriteBase /myguide/ |
| | 144 | RewriteRule ^$ wiki.cgi [L] |
| | 145 | </Directory> |
| | 146 | Redirect /cgi-bin/myguide/ http://www.example.com/myguide/ |
| | 147 | |
| | 148 | You will of course need to make the appropriate substitutions for |
| | 149 | your site. You also need to make sure that mod_rewrite is enabled in |
| | 150 | your web server before adding such a configuration. The final step in |
| | 151 | this URL tidying is to tell OpenGuides that the main CGI script can be |
| | 152 | assumed to be called from the root of the install directory; do this by |
| | 153 | setting the script name to be empty in wiki.conf: |
| | 154 | |
| | 155 | # what do you want the script to be called? |
| | 156 | script_name = |
| | 157 | |
| | 158 | Currently the Build script does not support this value, so you will |
| | 159 | have to make sure that you fix this up after an upgrade. |
| | 160 | |
| | 161 | |
| | 162 | * Multiple installations |
| | 163 | |
| | 164 | If you want to run multiple OpenGuides sites on one machine, you can use |
| | 165 | some tricks to make life easier. This isn't currently part of the official |
| | 166 | install routine, but will generally work. In the rest of this section we |
| | 167 | will assume that you already have a working OpenGuides install for a |
| | 168 | single site. |
| | 169 | |
| | 170 | Make a directory for the new site, and populate it with a set of symlinks |
| | 171 | to the main installation directory (ie. for wiki.cgi, supersearch.cgi, |
| | 172 | newpage.cgi, preferences.cgi, and the templates directory). wiki.conf |
| | 173 | will not be a symlink, since this will differ from the original site. |
| | 174 | In this case, simply copy the wiki.conf from the original install and |
| | 175 | modify it in the obvious way; most importantly, by giving it a different |
| | 176 | database name (we'll create the database in a moment). Don't forget to |
| | 177 | set up a separate directory for indices for the new site. |
| | 178 | |
| | 179 | Normally, the database is created by the installation process described |
| | 180 | above; however since we only want one copy of the modules and CGI |
| | 181 | programs, it isn't appropriate to run them again. So we will make use of |
| | 182 | the utility program "cgi-wiki-setupdb" which is included with the |
| | 183 | CGI::Wiki distribution. Documentation for this command can be found in |
| | 184 | its man page; run this with the appropriate arguments to create the |
| | 185 | new database. |
| | 186 | |
| | 187 | Once the key step of setting up the datbase has been performed, and the |
| | 188 | web server configured appropriately, the new site should be ready to go! |