diff --git a/docs/install.html b/docs/install.html index 78b0fdc..fc64f05 100644 --- a/docs/install.html +++ b/docs/install.html @@ -91,6 +91,7 @@
Since it's written using PHP, WebSVN is also very portable and easy to install.
Grab the source and stick it somewhere that your server can get to. You need to have @@ -98,11 +99,11 @@
svn
and svnlook
commands. While
no other external programs are required, you need to provide additional PHP libraries if not
- already installed. It's recommended to use the package manager of your OS-distribution for
+ already installed. It's recommended to use the package manager of your operating system for
each individual library or, if it doesn't provide those, that of PHP itself called
- PEAR. At least PEAR should most likely be available using the package
- manager of your OS-distribution. With e.g. a Debian based Linux simply issue the following
- commands to install the dependencies using PEAR:
+ PEAR. At least PEAR should most likely be available using your package
+ manager. With e.g., a Debian based operating system simply issue the following commands to
+ install the dependencies using PEAR:
If it isn't already, make sure the cache directory has permissions of at least 0700 and is owned by the process your webserver is running under. This is used to cache RSS files. It - is NOT recommended to set the directory to full write, 0777. + is not recommended to set the directory to full write, 0777.
+
+ WebSVN always requires a special configuration file, for which a template is provided as
+ include/distconfig.php
. Only the things mentioned in that template are valid
+ configs at all and some of those are even necessary, e.g., WebSVN obviously needs to know
+ which SVN repos it should publish. Making the necessary config file available to WebSVN can
+ be done using two ways: Either simply by copying the template file to the hard-coded path
+ include/config.php
and/or by setting the environment variable
+ WEBSVN_PATH_CONF
in a way so that PHP can read its value. That value is
+ expected to be the path to the config file to use and things like symlinks work as well of
+ course, as long as those are handled transparently by the file system.
+
+ Using the environment variable has two main benefits: One doesn't neet to store additional
+ files in the deployment of WebSVN and the path given by WEBSVN_PATH_CONF
is
+ used additionally to include/config.php
, if that file is present at
+ all. If not, the file given by the environment variable is used exclusively. This approach
+ allows to override specially chosen configs of some main configuration file using another
+ one based on things like the current location of a request to WebSVN. A webserver like
+ Apache HTTPd could be configured using Location
blocks to provide different
+ paths to config files using the environment variable like in the following example:
+
+<Location "/websvn/[...]"> + SetEnv WEBSVN_PATH_CONF "/home/websvn/config/[...]/config.php" +</Location>+ +
+ Considering both the hard-coded config file path and the more dynamic environment variable
+ allows setups in which one installation of WebSVN hosts various SVN repos configured using
+ $config->parentPath(...)
. That statement would simply be added the those files
+ only provided by the environment variable and depending on the location of some request. All
+ other common things like available templates, syntax highlighting, etc. would be set in
+ include/config.php
. That allows structuring SVN repos using subdirs like is
+ supported by svnserve
, which is otherwise not supported by WebSVN. The latter
+ checks if each directory is an SVN repo already or simply ignores it. The following is a
+ more comprehensive example:
+
+<Location "/websvn/ParentDir1"> + SetEnv WEBSVN_PATH_CONF "/home/websvn/config/ParentDir1/config.php" +</Location> + +<Location "/websvn/ParentDir1/ParentDir2"> + SetEnv WEBSVN_PATH_CONF "/home/websvn/config/ParentDir1/ParentDir2/config.php" +</Location> + +<Location "/websvn/ParentDir3"> + SetEnv WEBSVN_PATH_CONF "/home/websvn/config/ParentDir3/config.php" +</Location>+ +
/home/websvn/config/ParentDir1/config.php
:
+<?php +$config->parentPath("/home/svn_repos/ParentDir1"); +?>+ +
/home/websvn/config/ParentDir1/ParentDir2/config.php
:
+<?php +$config->parentPath("/home/svn_repos/ParentDir1/ParentDir2"); +?>+ +
/home/websvn/config/ParentDir3/config.php
:
+<?php +$config->parentPath("/home/svn_repos/ParentDir3"); +?>+
- Make a copy of
- include/distconfig.php
and name it include/config.php
, then edit
- it as directed in the file itself. Even with only the default config file, pointing your
- browser at the index.php
file should display a WebSVN page that instructs you
- to set up one or more repositories.
+ In such a setup, the directory /home/websvn/config/
could be a SVN working copy
+ containing the default config under /home/websvn/config/config.php
, being
+ symlinked into the formerly mentioned target in the installation directory of WebSVN. This
+ allows all configs to be managed at the same place and optionally versioned as well.