From 2700ed6a3e1092a064f28b07f8e2c4e5b9b830e7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 16 Nov 2015 20:02:06 +0200 Subject: Implement new URL path schema for the web interface --- etc/apachectl | 2 ++ etc/config | 1 + etc/httpd.conf | 24 ++++++++++++++++++------ etc/package-details.conf | 4 ++-- etc/package-search.conf | 2 +- etc/package-version-details.conf | 4 ++-- 6 files changed, 26 insertions(+), 11 deletions(-) (limited to 'etc') 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 @@ -77,22 +79,32 @@ LoadModule repository_details_srv ${AP_MODULE_DIR}/libbrep-apache.so - SetHandler package-search + SetHandler repository-root - + SetHandler package-details - + SetHandler package-version-details - - 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. +# + + SetHandler None -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 -- cgit v1.1