plugins/mod_http.lua
changeset 5332 5b73ac268a9e
parent 5230 6f5640375358
child 5374 b62c6cbcb065
--- a/plugins/mod_http.lua	Tue Feb 12 03:24:41 2013 +0100
+++ b/plugins/mod_http.lua	Mon Feb 18 13:12:14 2013 +0100
@@ -38,9 +38,10 @@
 end
 
 local function get_base_path(host_module, app_name, default_app_path)
-	return normalize_path(host_module:get_option("http_paths", {})[app_name] -- Host
+	return (normalize_path(host_module:get_option("http_paths", {})[app_name] -- Host
 		or module:get_option("http_paths", {})[app_name] -- Global
-		or default_app_path); -- Default
+		or default_app_path)) -- Default
+		:gsub("%$(%w+)", { host = module.host });
 end
 
 local ports_by_scheme = { http = 80, https = 443, };