mod_http: Add 'http_host' option to change the HTTP virtual host that this host is accessible at (e.g. allows mapping a host to '127.0.0.1')
authorMatthew Wild <mwild1@gmail.com>
Thu, 15 Nov 2012 13:24:10 -0500
changeset 5180 4ef69555a879
parent 5179 f3662fea95d9
child 5181 1e9508ae44cc
mod_http: Add 'http_host' option to change the HTTP virtual host that this host is accessible at (e.g. allows mapping a host to '127.0.0.1')
plugins/mod_http.lua
--- a/plugins/mod_http.lua	Thu Nov 15 13:18:41 2012 -0500
+++ b/plugins/mod_http.lua	Thu Nov 15 13:24:10 2012 -0500
@@ -67,7 +67,7 @@
 end
 
 function module.add_host(module)
-	local host = module.host;
+	local host = module:get_option_string("http_host", module.host);
 	local apps = {};
 	module.environment.apps = apps;
 	local function http_app_added(event)