httpd: reduce variable scope