webserver multiple domains
Posted: Wed Jun 09, 2010 8:24 pm
Has anyone else used the newlisp http mode to host several domains at once? Is the appropriate method to modify the command-prompt? Is an environment variable already set, or should I parse stdin to find out what the domain is? How much parsing does newlisp do in http mode? Just the first line of PUT/GET/etc? And what variables does newlisp use to do its evaluating/processing afterward.
For instance, I want to hook in a handler to generate a directory listing. Is there a callback I can set? Or should I just "exit" once I'm done handling my URL, on the assumption that newlisp forks for every connection? What if I want to futz with the headers a bit, but otherwise let newlisp do its thing of reading a file and blasting it out over the socket? Should I do that in newlisp? Do I lose much efficiency in read/write by doing that?
I host quite a few domains; I'm currently migrating them all over to the newlisp webserver.
I understand about setting the Status line, then having complete control over the output. Guess I'll have to make utility functions to do things that newlisp does automatically under the hood.
Ted
For instance, I want to hook in a handler to generate a directory listing. Is there a callback I can set? Or should I just "exit" once I'm done handling my URL, on the assumption that newlisp forks for every connection? What if I want to futz with the headers a bit, but otherwise let newlisp do its thing of reading a file and blasting it out over the socket? Should I do that in newlisp? Do I lose much efficiency in read/write by doing that?
I host quite a few domains; I'm currently migrating them all over to the newlisp webserver.
I understand about setting the Status line, then having complete control over the output. Guess I'll have to make utility functions to do things that newlisp does automatically under the hood.
Ted