aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-16 20:02:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-25 20:35:10 +0200
commit2700ed6a3e1092a064f28b07f8e2c4e5b9b830e7 (patch)
treea54ffc979dde42e609bc9877120fa010887c6b66 /etc
parent48a3c47d34c2acc0a39e2db5acfd437dace499c1 (diff)
Implement new URL path schema for the web interface
Diffstat (limited to 'etc')
-rwxr-xr-xetc/apachectl2
-rw-r--r--etc/config1
-rw-r--r--etc/httpd.conf24
-rw-r--r--etc/package-details.conf4
-rw-r--r--etc/package-search.conf2
-rw-r--r--etc/package-version-details.conf4
6 files changed, 26 insertions, 11 deletions
diff --git a/etc/apachectl b/etc/apachectl
index 895d580..4c67c1f 100755
--- a/etc/apachectl
+++ b/etc/apachectl
@@ -37,6 +37,7 @@ export AP_MODULE_DIR
export AP_WWW_DIR
export AP_CONFIG_DIR
export AP_WORKSPACE_DIR
+export AP_REPOSITORY_DIR
if test -n "$AP_LIB_DIRS"; then
export LD_LIBRARY_PATH=$AP_LIB_DIRS:$LD_LIBRARY_PATH
@@ -44,6 +45,7 @@ fi
mkdir -p "$AP_WORKSPACE_DIR"
mkdir -p "$AP_LOG_DIR"
+mkdir -p "$AP_REPOSITORY_DIR"
# the path to your httpd binary, including options if necessary
diff --git a/etc/config b/etc/config
index dd89ee1..c7edd56 100644
--- a/etc/config
+++ b/etc/config
@@ -29,6 +29,7 @@ AP_WWW_DIR="$PROJECT_DIR/www"
AP_CONFIG_DIR="$CONFIG_DIR"
AP_LOG_DIR="$WORKSPACE_DIR/log/httpd"
AP_WORKSPACE_DIR="$WORKSPACE_DIR/run/httpd"
+AP_REPOSITORY_DIR="$WORKSPACE_DIR/www"
# brep-loader settings (used in loader)
#
diff --git a/etc/httpd.conf b/etc/httpd.conf
index 2570a5b..96a8b74 100644
--- a/etc/httpd.conf
+++ b/etc/httpd.conf
@@ -40,6 +40,8 @@ LoadModule expires_module /usr/lib64/httpd/modules/mod_expires.so
LoadModule dir_module /usr/lib64/httpd/modules/mod_dir.so
LoadModule alias_module /usr/lib64/httpd/modules/mod_alias.so
+LoadModule repository_root_srv ${AP_MODULE_DIR}/libbrep-apache.so
+
LoadModule package_search_srv ${AP_MODULE_DIR}/libbrep-apache.so
<IfModule package_search_srv>
@@ -77,22 +79,32 @@ LoadModule repository_details_srv ${AP_MODULE_DIR}/libbrep-apache.so
</IfModule>
<LocationMatch ^${AP_ROOT}/?$>
- SetHandler package-search
+ SetHandler repository-root
</LocationMatch>
-<LocationMatch ^${AP_ROOT}/go/[^/]+$>
+<LocationMatch ^${AP_ROOT}/[^/]+$>
SetHandler package-details
</LocationMatch>
-<LocationMatch ^${AP_ROOT}/go/[^/]+/[^/]+$>
+<LocationMatch ^${AP_ROOT}/[^/]+/[^/]+$>
SetHandler package-version-details
</LocationMatch>
-<LocationMatch ^${AP_ROOT}/about$>
- SetHandler repository-details
+# Disable package-version-details and package-details handlers on static files
+# and repository content locations.
+# Location examples: /@, /@/common.css, /1, /1/math/stable.
+#
+<LocationMatch ^${AP_ROOT}/(@|\d+)(/.*)?$>
+ SetHandler None
</LocationMatch>
-AliasMatch ^${AP_ROOT}/(.+) ${AP_WWW_DIR}/$1
+# Static files locations.
+#
+AliasMatch ^${AP_ROOT}/@/(.+) ${AP_WWW_DIR}/$1
+
+# Repository files locations.
+#
+AliasMatch ^${AP_ROOT}/(\d+)/(.+) ${AP_REPOSITORY_DIR}/$1/$2
ExtendedStatus On
diff --git a/etc/package-details.conf b/etc/package-details.conf
index 49b3dce..66a7c17 100644
--- a/etc/package-details.conf
+++ b/etc/package-details.conf
@@ -8,8 +8,8 @@ verb 1
# brep::package_details options
#
-# @@ Set to 10
+# @@ Set to 10.
results-on-page 2
pages-in-pager 5
-# @@ Set to 500 (~ 80 chars x 6 lines)
+# @@ Set to 500 (~ 80 chars x 6 lines).
description-length 100
diff --git a/etc/package-search.conf b/etc/package-search.conf
index 80562b2..4c1484f 100644
--- a/etc/package-search.conf
+++ b/etc/package-search.conf
@@ -8,6 +8,6 @@ verb 1
# brep::package_search options
#
-# @@ Set to 10
+# @@ Set to 10.
results-on-page 2
pages-in-pager 5
diff --git a/etc/package-version-details.conf b/etc/package-version-details.conf
index 84fd75d..865e162 100644
--- a/etc/package-version-details.conf
+++ b/etc/package-version-details.conf
@@ -8,7 +8,7 @@ verb 1
# brep::package_version_details options
#
-# @@ Set to 500 (~ 80 chars x 6 lines)
+# @@ Set to 500 (~ 80 chars x 6 lines).
description-length 100
-# @@ Set to 5000 (~ 80 chars x 60 lines)
+# @@ Set to 5000 (~ 80 chars x 60 lines).
changes-length 100