Use location of script to find web-server root
This commit is contained in:
parent
0a7ada489d
commit
2b27ee6569
|
@ -43,11 +43,11 @@ exec scsh -lel sunet-2.1/load.scm -dm -o http-test -e main -s "$0" "$@"
|
|||
(define simultaneous-requests #f)
|
||||
|
||||
(define (init)
|
||||
(set! htdocs-dir "web-server/root/htdocs")
|
||||
(set! cgi-bin-dir "web-server/root/cgi-bin")
|
||||
(set! htdocs-dir "root/htdocs")
|
||||
(set! cgi-bin-dir "root/cgi-bin")
|
||||
(set! port "8080")
|
||||
(set! log-file-name "web-server/httpd.log")
|
||||
(set! root "web-server/root")
|
||||
(set! log-file-name "httpd.log")
|
||||
(set! root "root")
|
||||
(set! simultaneous-requests "5"))
|
||||
|
||||
(define get-options
|
||||
|
@ -112,6 +112,8 @@ exec scsh -lel sunet-2.1/load.scm -dm -o http-test -e main -s "$0" "$@"
|
|||
|
||||
|
||||
(define (main args)
|
||||
(with-cwd
|
||||
(file-name-directory (car (command-line)))
|
||||
(init)
|
||||
(format #t "reading options: ~s~%" (cdr args))
|
||||
(get-options (cdr args))
|
||||
|
@ -153,7 +155,7 @@ exec scsh -lel sunet-2.1/load.scm -dm -o http-test -e main -s "$0" "$@"
|
|||
(cons "info" (info-handler #f #f #f
|
||||
"Generated by info-gateway"))
|
||||
(cons "cgi-bin" (cgi-handler cgi-bin-dir)))
|
||||
(rooted-file-or-directory-handler htdocs-dir)))))
|
||||
(rooted-file-or-directory-handler htdocs-dir))))))
|
||||
))
|
||||
|
||||
;; EOF
|
||||
|
|
|
@ -53,13 +53,13 @@ exec scsh -lel sunet-2.1/load.scm -lel ssax/load.scm -dm -o surflet-server -e ma
|
|||
(define simultaneous-requests #f)
|
||||
|
||||
(define (init)
|
||||
(set! htdocs-dir "./web-server/root/htdocs")
|
||||
(set! images-dir "./web-server/root/img")
|
||||
(set! htdocs-dir "root/htdocs")
|
||||
(set! images-dir "root/img")
|
||||
; (set! cgi-bin-dir "./web-server/root/cgi-bin")
|
||||
(set! port "8008")
|
||||
(set! log-file-name "./web-server/httpd.log")
|
||||
(set! root "./web-server/root")
|
||||
(set! surflet-dir "./web-server/root/surflets")
|
||||
(set! log-file-name "httpd.log")
|
||||
(set! root "root")
|
||||
(set! surflet-dir "root/surflets")
|
||||
(set! simultaneous-requests "5"))
|
||||
|
||||
(define (normalize-options)
|
||||
|
@ -144,6 +144,8 @@ exec scsh -lel sunet-2.1/load.scm -lel ssax/load.scm -dm -o surflet-server -e ma
|
|||
(main '(main))))
|
||||
|
||||
(define (main args)
|
||||
(with-cwd
|
||||
(file-name-directory (car (command-line)))
|
||||
(init)
|
||||
(format #t "reading options: ~s~%" (cdr args))
|
||||
(get-options (cdr args))
|
||||
|
@ -200,7 +202,7 @@ exec scsh -lel sunet-2.1/load.scm -lel ssax/load.scm -dm -o surflet-server -e ma
|
|||
(cons "surflet" (surflet-handler
|
||||
(with-surflet-path surflet-dir))))
|
||||
(rooted-file-or-directory-handler htdocs-dir))))
|
||||
)
|
||||
))
|
||||
))
|
||||
;; EOF
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ exec scsh -lel sunet-2.1/load.scm -dm -o http-test -e main -s "$0" "$@"
|
|||
(define root #f)
|
||||
|
||||
(define (init)
|
||||
(set! htdocs-dir "web-server/root/htdocs")
|
||||
(set! cgi-bin-dir "web-server/root/cgi-bin")
|
||||
(set! htdocs-dir "root/htdocs")
|
||||
(set! cgi-bin-dir "root/cgi-bin")
|
||||
(set! port "8080")
|
||||
(set! log-file-name "web-server/httpd.log")
|
||||
(set! root "web-server/root"))
|
||||
(set! log-file-name "httpd.log")
|
||||
(set! root "root"))
|
||||
|
||||
(define get-options
|
||||
(let* ((unknown-option-error
|
||||
|
@ -103,6 +103,8 @@ exec scsh -lel sunet-2.1/load.scm -dm -o http-test -e main -s "$0" "$@"
|
|||
(set-uid (->uid "nobody")))))
|
||||
|
||||
(define (main args)
|
||||
(with-cwd
|
||||
(file-name-directory (car (command-line)))
|
||||
(init)
|
||||
(format #t "reading options: ~s~%" (cdr args))
|
||||
(get-options (cdr args))
|
||||
|
@ -131,7 +133,7 @@ exec scsh -lel sunet-2.1/load.scm -dm -o http-test -e main -s "$0" "$@"
|
|||
(cons "seval" seval-handler))
|
||||
(tilde-home-dir-handler "public_html"
|
||||
(rooted-file-or-directory-handler
|
||||
htdocs-dir))))))
|
||||
htdocs-dir)))))))
|
||||
))
|
||||
;; EOF
|
||||
|
||||
|
|
Loading…
Reference in New Issue