diff options
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/apachectl | 5 | ||||
-rw-r--r-- | etc/config | 1 | ||||
-rw-r--r-- | etc/httpd.conf | 19 |
3 files changed, 16 insertions, 9 deletions
diff --git a/etc/apachectl b/etc/apachectl index e282d9f..895d580 100755 --- a/etc/apachectl +++ b/etc/apachectl @@ -26,10 +26,11 @@ ARGV="$@" -export AP_LOG_LEVEL -export AP_ADMIN_EMAIL export AP_PORT export AP_SERVER_NAME +export AP_ROOT +export AP_ADMIN_EMAIL +export AP_LOG_LEVEL export AP_DB_HOST export AP_DB_PORT export AP_MODULE_DIR @@ -18,6 +18,7 @@ PG_WORKSPACE_DIR="$WORKSPACE_DIR/run/pgsql" # AP_PORT=8080 AP_SERVER_NAME="cppget.org:$AP_PORT" +AP_ROOT="" # Value examples: "", "/foo", "/foo/bar". AP_ADMIN_EMAIL=admin@cppget.org AP_LOG_LEVEL=trace1 AP_DB_HOST="$PG_WORKSPACE_DIR" diff --git a/etc/httpd.conf b/etc/httpd.conf index 1000b04..c8405ed 100644 --- a/etc/httpd.conf +++ b/etc/httpd.conf @@ -5,7 +5,6 @@ ServerAdmin "${AP_ADMIN_EMAIL}" User apache Group apache -DocumentRoot "${AP_WWW_DIR}" CoreDumpDirectory "${AP_WORKSPACE_DIR}" PidFile "${AP_WORKSPACE_DIR}/httpd.pid" @@ -39,43 +38,49 @@ LoadModule deflate_module /usr/lib64/httpd/modules/mod_deflate.so LoadModule authz_host_module /usr/lib64/httpd/modules/mod_authz_host.so 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 package_search_srv ${AP_MODULE_DIR}/libbrep-apache.so <IfModule package_search_srv> + package-search-root ${AP_ROOT}/ package-search-db-host ${AP_DB_HOST} package-search-db-port ${AP_DB_PORT} - package-search-conf "${AP_CONFIG_DIR}/package-search.conf" + package-search-conf ${AP_CONFIG_DIR}/package-search.conf </IfModule> LoadModule package_details_srv ${AP_MODULE_DIR}/libbrep-apache.so <IfModule package_details_srv> + package-details-root ${AP_ROOT}/ package-details-db-host ${AP_DB_HOST} package-details-db-port ${AP_DB_PORT} - package-details-conf "${AP_CONFIG_DIR}/package-details.conf" + package-details-conf ${AP_CONFIG_DIR}/package-details.conf </IfModule> LoadModule package_version_details_srv ${AP_MODULE_DIR}/libbrep-apache.so <IfModule package_version_details_srv> + package-version-details-root ${AP_ROOT}/ package-version-details-db-host ${AP_DB_HOST} package-version-details-db-port ${AP_DB_PORT} - package-version-details-conf "${AP_CONFIG_DIR}/package-version-details.conf" + package-version-details-conf ${AP_CONFIG_DIR}/package-version-details.conf </IfModule> -<LocationMatch ^/$> +<LocationMatch ^${AP_ROOT}/?$> SetHandler package-search </LocationMatch> -<LocationMatch ^/go/[^/]+$> +<LocationMatch ^${AP_ROOT}/go/[^/]+$> SetHandler package-details </LocationMatch> -<LocationMatch ^/go/[^/]+/[^/]+$> +<LocationMatch ^${AP_ROOT}/go/[^/]+/[^/]+$> SetHandler package-version-details </LocationMatch> +AliasMatch ^${AP_ROOT}/(.+) ${AP_WWW_DIR}/$1 + ExtendedStatus On <Location /server-status> |