Hi Tomas,

> If I understand it well, you have a server with static content
> http://www.software-lab.de/ running apache (and no picolisp
> application) and a server with picolisp web server http://7fach.de/ to
> run picolisp applications (and not any other web server).

Yes.

Running both Apache and httpGate on the same server might result in a
resource conflict (ports 80 and 443).



> For each picolisp application, you create a DNS record first, e.g.
> 
>    app.7fach.de CNAME 7fach.de

This is not necessary. There is only a single record for the whole
domain. Any request of the form "xxx.7fach.de" will be directed to that
server. Adding a new application is a matter of seconds.


> Then you use the home.l application behind httpGate to redirect to the
> right local port (application):
> 
>   http://app.7fach.de/ => http://7fach.de/8080
> 
> Your static content and picolisp applications simply live on different
> servers.

Yes.

It is possible, though, to serve also static content via this mechanism,
and also PicoLisp applications together with non-PicoLisp applications.
Currently I'm doing just this at one of my customer's sites. A separate
application server (written in Phyton in this case), reachable through
httpGate.


> I have one server only though and do not want to use picolisp server
> exclusively on that server to serve all my web content.

One possibility would be to either have Apache run on a different port,
and modify "home.l" in such a way that all non-matching requests are
sent there, or do the opposite and direct certain request to httpGate
running on some other port (I don't know anything about configuring
Apache).


> The url rewriting by httpGate is "only" to find the right port to
> handle the request and it also assumes that the url have a "special"
> format:
> 
> 1) ^/<port>/  some session
> 2) ^/         app entry point on a second httpGate port,
>               interpreted *.l file or a static file

I'm not sure if I understood your idea. When httpGate detects a number
as the first part of an URL, it takes it as a port to connect to.
Otherwise, it connects to the default port given on the command line
(65500 in our case). In both cases it passes the rest of the URL (with
the port number, if any, removed) directly to the application on that
port.

So I think there is no need for a second httpGate. You can do any
handling you like in "home.l" or some other application where it
redirects to.

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to