adapt to new web-server configuration

svn: r12336
This commit is contained in:
Eli Barzilay 2008-11-06 22:05:50 +00:00
parent dba3ba8591
commit 9745240831
9 changed files with 15 additions and 64 deletions

View File

@ -1,7 +0,0 @@
<html>
<head><title>Garbage Collect Ran</title></head>
<body bgcolor='white'>
<p>The garbage collection routine has run.</p>
<p>Powered by <a href="http://www.plt-scheme.org/">PLT</a></p>
</body>
</html>

View File

@ -1,7 +0,0 @@
<html>
<head><title>Access Denied</title></head>
<body>
<p>The server could not verify that you have permissions to access the requested document.</p>
<p>Powered by <a href="http://www.plt-scheme.org/">PLT</a></p>
</body>
</html>

View File

@ -1,7 +0,0 @@
<html>
<head><title>Not Found</title></head>
<body bgcolor='white'>
<p>The file you were looking for was not found on this server.</p>
<p>Powered by <a href="http://www.plt-scheme.org/">PLT</a></p>
</body>
</html>

View File

@ -1,7 +0,0 @@
<html>
<head><title>Passwords Refreshed</title></head>
<body bgcolor='white'>
<p>The Web server is now using the new password file.</p>
<p>Powered by <a href="http://www.plt-scheme.org/">PLT</a></p>
</body>
</html>

View File

@ -1,7 +0,0 @@
<html>
<head><title>Browser Error</title></head>
<body>
<p>The browser sent a malformed request.</p>
<p>Powered by <a href="http://www.plt-scheme.org/">PLT</a></p>
</body>
</html>

View File

@ -1,9 +0,0 @@
<html>
<head><title>Servlet Error</title></head>
<body>
<p>The servlet terminated abnormally.<br />
Please ask the author to fix the problem based on the details in
the Web server's log file.</p>
<p>Powered by <a href="http://www.plt-scheme.org/">PLT</a></p>
</body>
</html>

View File

@ -1,7 +0,0 @@
<html>
<head><title>Servlets Refreshed</title></head>
<body bgcolor='white'>
<p>Fresh copies of Servlets will now be (re)loaded from disk.</p>
<p>Powered by <a href="http://www.plt-scheme.org/">PLT</a></p>
</body>
</html>

View File

@ -3,6 +3,6 @@
<body>
The handin status server is running.
<br>
You can <a href="/servlets/status.ss">check your submissions</a> on this server.
You can <a href="/status.ss">check your submissions</a> on this server.
</body>
</html>

View File

@ -15,10 +15,15 @@
(define (serve-status port-no)
(define ((in-dir dir) . paths) (path->string (apply build-path dir paths)))
(define in-here
(in-dir (build-path (this-expression-source-directory) "status-web-root")))
(define in-plt-web-dir
(in-dir (build-path (collection-path "web-server") "default-web-root")))
(define web-dir
(path->string
(or (get-conf 'web-base-dir)
(build-path (this-expression-source-directory) "status-web-root"))))
(cond [(get-conf 'web-base-dir) => path->string]
[else (in-here)]))
(define config
`((port ,port-no)
@ -43,17 +48,14 @@
(file-per-byte-connection-timeout 1/20)
(file-base-connection-timeout 30))
(paths
(configuration-root "conf")
(host-root ,web-dir)
(configuration-root ,(in-plt-web-dir "conf"))
(host-root ".")
(log-file-path ,(cond [(get-conf 'web-log-file) => path->string]
[else #f]))
(file-root "htdocs")
(servlet-root ,web-dir)
(mime-types ,(path->string
(build-path (collection-path "web-server")
"default-web-root"
"mime.types")))
(password-authentication "unused"))))
(file-root ".")
(servlet-root ,(in-here "servlets"))
(mime-types ,(in-plt-web-dir "mime.types"))
(password-authentication ,(in-plt-web-dir "passwords")))))
(virtual-host-table)))
(define configuration