status.ss is always in the web directory, so people can modify it more easily
svn: r12337
This commit is contained in:
parent
9745240831
commit
714031c1d6
|
@ -116,11 +116,13 @@ This directory contains the following files and sub-directories:
|
||||||
|
|
||||||
@item{@indexed-scheme[web-base-dir] --- if @scheme[#f] (the
|
@item{@indexed-scheme[web-base-dir] --- if @scheme[#f] (the
|
||||||
default), the built-in web server will use the
|
default), the built-in web server will use the
|
||||||
@filepath{status-web-root} in this collection for its
|
@filepath{status-web-root} in the handin collection for its
|
||||||
configuration; to have complete control over the built in server,
|
configuration; to have complete control over the built in server
|
||||||
you can copy and edit @filepath{status-web-root}, and add this
|
content, you can copy and edit @filepath{status-web-root}, then
|
||||||
configuration entry with the name of your new copy (relative to
|
add this configuration entry set to the name of your new copy
|
||||||
the handin server directory, or absolute).}
|
(relative to the handin server directory, or absolute). Note that
|
||||||
|
you must copy the @filepath{servlets} directory if you want the
|
||||||
|
status servlet.}
|
||||||
|
|
||||||
@item{@indexed-scheme[web-log-file] --- a path (relative to handin
|
@item{@indexed-scheme[web-log-file] --- a path (relative to handin
|
||||||
server directory or absolute) that specifies a filename for
|
server directory or absolute) that specifies a filename for
|
||||||
|
@ -217,7 +219,7 @@ This directory contains the following files and sub-directories:
|
||||||
Changes to @filepath{config.ss} are detected, the file will be
|
Changes to @filepath{config.ss} are detected, the file will be
|
||||||
re-read, and options are reloaded. A few options are fixed at
|
re-read, and options are reloaded. A few options are fixed at
|
||||||
startup time: port numbers, log file specs, and the
|
startup time: port numbers, log file specs, and the
|
||||||
@scheme[web-base-dir] are as configured at startup. All other
|
@scheme[web-base-dir] are fixed as configured at startup. All other
|
||||||
options will change the behavior of the running server (but things
|
options will change the behavior of the running server (but things
|
||||||
like @scheme[username-case-sensitive?] it would be unwise to do
|
like @scheme[username-case-sensitive?] it would be unwise to do
|
||||||
so). (For safety, options are not reloaded until the file parses
|
so). (For safety, options are not reloaded until the file parses
|
||||||
|
|
|
@ -16,15 +16,13 @@
|
||||||
(define (serve-status port-no)
|
(define (serve-status port-no)
|
||||||
|
|
||||||
(define ((in-dir dir) . paths) (path->string (apply build-path dir paths)))
|
(define ((in-dir dir) . paths) (path->string (apply build-path dir paths)))
|
||||||
(define in-here
|
(define in-web-dir
|
||||||
(in-dir (build-path (this-expression-source-directory) "status-web-root")))
|
(in-dir (or (get-conf 'web-base-dir)
|
||||||
|
(build-path (this-expression-source-directory)
|
||||||
|
"status-web-root"))))
|
||||||
(define in-plt-web-dir
|
(define in-plt-web-dir
|
||||||
(in-dir (build-path (collection-path "web-server") "default-web-root")))
|
(in-dir (build-path (collection-path "web-server") "default-web-root")))
|
||||||
|
|
||||||
(define web-dir
|
|
||||||
(cond [(get-conf 'web-base-dir) => path->string]
|
|
||||||
[else (in-here)]))
|
|
||||||
|
|
||||||
(define config
|
(define config
|
||||||
`((port ,port-no)
|
`((port ,port-no)
|
||||||
(max-waiting 40)
|
(max-waiting 40)
|
||||||
|
@ -53,7 +51,7 @@
|
||||||
(log-file-path ,(cond [(get-conf 'web-log-file) => path->string]
|
(log-file-path ,(cond [(get-conf 'web-log-file) => path->string]
|
||||||
[else #f]))
|
[else #f]))
|
||||||
(file-root ".")
|
(file-root ".")
|
||||||
(servlet-root ,(in-here "servlets"))
|
(servlet-root ,(in-web-dir "servlets"))
|
||||||
(mime-types ,(in-plt-web-dir "mime.types"))
|
(mime-types ,(in-plt-web-dir "mime.types"))
|
||||||
(password-authentication ,(in-plt-web-dir "passwords")))))
|
(password-authentication ,(in-plt-web-dir "passwords")))))
|
||||||
(virtual-host-table)))
|
(virtual-host-table)))
|
||||||
|
@ -61,7 +59,7 @@
|
||||||
(define configuration
|
(define configuration
|
||||||
(configuration-table-sexpr->web-config@
|
(configuration-table-sexpr->web-config@
|
||||||
config
|
config
|
||||||
#:web-server-root web-dir
|
#:web-server-root (in-web-dir)
|
||||||
#:make-servlet-namespace
|
#:make-servlet-namespace
|
||||||
(make-make-servlet-namespace
|
(make-make-servlet-namespace
|
||||||
#:to-be-copied-module-specs
|
#:to-be-copied-module-specs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user