#lang mzscheme
(require (file "../preprocess.ss"))
(define (make-web-server server-name server-admin sites)
(cons
(make-main server-name server-admin)
(map
(lambda (params) (apply make-site params))
sites)))
(define (make-main server-name server-admin)
(apply-template
(open-input-file "main-apache.conf")
`((server-name . ,server-name)
(server-admin . ,server-admin))))
(define (make-site server-root servlet-path forward-root)
(apply-template
(open-input-file "site-apache.conf")
`((server-root . ,server-root)
(servlet-path . ,servlet-path)
(forward-root . ,forward-root))))
(provide (all-defined))