hello,
i use tbnl to manage some web site. i would like to know how can i do to have several web site ? i have this already :
LispServer 127.0.0.1 3000 "tbnl"
<Location /tbnl> SetHandler lisp-handler </Location>
i would like to start a second web site someone know how can i do this ?
<Location /foo> SetHandler lisp-handler </Location>
Nicolas Lamirault wrote:
i use tbnl to manage some web site. i would like to know how can i do to have several web site ? i have this already :
LispServer 127.0.0.1 3000 "tbnl"
<Location /tbnl> SetHandler lisp-handler
</Location>
So far, so good.
i would like to start a second web site someone know how can i do this ?
<Location /foo> SetHandler lisp-handler
</Location>
OK, there are various options on either the Apache and the Lisp end, to my knowledge. Note that I've not used all of them, so I may be wrong.
Lisp:
1. If you want to run both websites from the same Lisp environment, you can change the mod_lisp server ID. In your line
LispServer 127.0.0.1 3000 "tbnl"
"tbnl" is the server ID. So you could add another LispServer directive to your second <Location>, which has a different server ID. The server id is communicated to TBNL via the "server-id" request header, which you can check via the tbnl:header-in accessor. You could check this header in your dispatchers and act accordingly.
2. Multiple Lisp environments. For this to work, you'll need each Lisp environment listening on a different port. On the Apache end, this is very similar to the above method. The '3000' in the LispServer line is the TCP port. Change this for your second <Location> and before calling (tbnl:start-tbnl) for this location, (setq tbnl:*tbnl-port* <port>) to the same port number.
Apache: This depends what you mean by 'different websites'. From your message it seems you just want a different directory ("/foo") on the same server. In that case, the <Location> directive is the way to go.
If you want the two sites to be available at different hostnames, which both point to the same physical ID, you need to use Apache's Virtual Host capability.
You'll need to declare somewhere in the apache config that you're using named virtual hosts, for example:
NameVirtualHost *:80
<VirtualHost *:80> ServerName tbnl.yourserver.org SetHandler lisp-handler LispServer 127.0.0.1 3000 "tbnl" </VirtualHost>
<VirtualHost *:80> ServerName foo.yourserver.org SetHandler lisp-handler LispServer 127.0.0.1 3000 "foo" </VirtualHost>
This is just the simplest setup, the details of configuring Apache beyond this are off-topic on this list though, I think, but there's plenty of documentation on the web out there, so you shouldn't have too much trouble.
By the way, I'm setting up a website which is successfully using a combination of virtual hosts/multiple Lisp environments, so that definitely works. I'm new to TBNL and Lisp in general, I hope the experts on the list will point out any errors in this post. :)
~phil
On 2005-09-28 12:49:55, Phillip Jordan wrote:
If you want to run both websites from the same Lisp environment, you can change the mod_lisp server ID. In your line
Or dispatch according to the host:
http://common-lisp.net/pipermail/tbnl-devel/2004-July/000060.html
Hi!
On Tue, 27 Sep 2005 16:08:22 +0200, Nicolas Lamirault lam@tuxfamily.org wrote:
i use tbnl to manage some web site. i would like to know how can i do to have several web site ?
This is actually more a question about Apache/mod_lisp and not about TBNL but it's OK to discuss it here.
i have this already :
LispServer 127.0.0.1 3000 "tbnl"
<Location /tbnl> SetHandler lisp-handler
</Location>
i would like to start a second web site someone know how can i do this ?
<Location /foo> SetHandler lisp-handler
</Location>
For example:
<Location /foo> LispServer 127.0.0.1 3000 "foo" SetHandler lisp-handler </Location>
<Location /bar> LispServer 127.0.0.1 3001 "bar" SetHandler lisp-handler </Location>
Then start two different Lisps, one listening on 3000, the other one listening on 3001.
Does that help?
Cheers, Edi.
Edi Weitz edi@agharta.de writes:
Hi!
On Tue, 27 Sep 2005 16:08:22 +0200, Nicolas Lamirault lam@tuxfamily.org wrote:
i use tbnl to manage some web site. i would like to know how can i do to have several web site ?
This is actually more a question about Apache/mod_lisp and not about TBNL but it's OK to discuss it here.
i have this already :
LispServer 127.0.0.1 3000 "tbnl"
<Location /tbnl> SetHandler lisp-handler
</Location>
i would like to start a second web site someone know how can i do this ?
<Location /foo> SetHandler lisp-handler
</Location>
For example:
<Location /foo> LispServer 127.0.0.1 3000 "foo" SetHandler lisp-handler
</Location>
<Location /bar> LispServer 127.0.0.1 3001 "bar" SetHandler lisp-handler
</Location>
Then start two different Lisps, one listening on 3000, the other one listening on 3001.
ok thanks a lot
i try this configuration of apache :
<Location /cl-album> LispServer 127.0.0.1 3000 "cl-album" SetHandler lisp-handler </Location>
<Location /musicdb> LispServer 127.0.0.1 3001 "musicdb" SetHandler lisp-handler </Location>
but when i try to acces web site by http://127.0.0.1/cl-album/index or http://127.0.0.1/musicdb/index, i have the tbnl's default page.
Does that help?
Cheers, Edi.
On Thu, 29 Sep 2005 13:36:25 +0200, Nicolas Lamirault lam@tuxfamily.org wrote:
i try this configuration of apache :
<Location /cl-album> LispServer 127.0.0.1 3000 "cl-album" SetHandler lisp-handler
</Location>
<Location /musicdb> LispServer 127.0.0.1 3001 "musicdb" SetHandler lisp-handler
</Location>
but when i try to acces web site by http://127.0.0.1/cl-album/index or http://127.0.0.1/musicdb/index, i have the tbnl's default page.
What did you expect instead? Do you have dispatchers and handlers for the URIs "/cl-album/index" and "/musicdb/index"? Otherwise it is quite clear that you see the default page.
For a simple test you could start two different Lisps like, say, LispWorks listening on port 3000 and CMUCL listening on port 3001. You should see two different default pages.
Cheers, Edi.
thank you has all ! i have 2 web site now
Edi Weitz edi@agharta.de writes:
Hi!
On Tue, 27 Sep 2005 16:08:22 +0200, Nicolas Lamirault lam@tuxfamily.org wrote:
i use tbnl to manage some web site. i would like to know how can i do to have several web site ?
This is actually more a question about Apache/mod_lisp and not about TBNL but it's OK to discuss it here.
i have this already :
LispServer 127.0.0.1 3000 "tbnl"
<Location /tbnl> SetHandler lisp-handler
</Location>
i would like to start a second web site someone know how can i do this ?
<Location /foo> SetHandler lisp-handler
</Location>
For example:
<Location /foo> LispServer 127.0.0.1 3000 "foo" SetHandler lisp-handler
</Location>
<Location /bar> LispServer 127.0.0.1 3001 "bar" SetHandler lisp-handler
</Location>
Then start two different Lisps, one listening on 3000, the other one listening on 3001.
Does that help?
Cheers, Edi.
Hi
If you'd like to run two different instances of Lisp you can compile another version of mod_lisp and do something like this:
<VirtualHost 192.168.10.2:80> LispServer 127.0.0.1 3000 "tbnl"
<Location /> SetHandler lisp-handler </Location> </VirtualHost>
<VirtualHost 192.168.10.22:80> LispServer2 127.0.0.1 3001 "tbnl" <Location /> SetHandler lisp2-handler </Location> </VirtualHost>
We do that here because there are two separate Lisp projects being developed, but we use the same box for both of them. The box (FreeBSD) responds to two IPs.
Steve Huffman
On Sep 27, 2005, at 10:08 AM, Nicolas Lamirault wrote:
hello,
i use tbnl to manage some web site. i would like to know how can i do to have several web site ? i have this already :
LispServer 127.0.0.1 3000 "tbnl"
<Location /tbnl> SetHandler lisp-handler
</Location>
i would like to start a second web site someone know how can i do this ?
<Location /foo> SetHandler lisp-handler
</Location>
-- Nicolas Lamirault _______________________________________________ tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel
"Steve Huffman" steve.huffman@gmail.com wrote:
If you'd like to run two different instances of Lisp you can compile another version of mod_lisp and do something like this:
<VirtualHost 192.168.10.2:80> LispServer 127.0.0.1 3000 "tbnl"
<Location /> SetHandler lisp-handler </Location> </VirtualHost>
<VirtualHost 192.168.10.22:80> LispServer2 127.0.0.1 3001 "tbnl"
<Location /> SetHandler lisp2-handler </Location> </VirtualHost>
We do that here because there are two separate Lisp projects being developed, but we use the same box for both of them. The box (FreeBSD) responds to two IPs.
There is no need to compile 2 mod_lisp versions. Why don't you just change the LispServer directive, as shown by Edi in a previous email ?
LispServer2 127.0.0.1 3001 "tbnl" => LispServer 127.0.0.1 3001 "tbnl"
Marc
There is no need to compile 2 mod_lisp versions. Why don't you just change the LispServer directive, as shown by Edi in a previous email ?
LispServer2 127.0.0.1 3001 "tbnl" => LispServer 127.0.0.1 3001 "tbnl"
Indeed, that works fine. We must have botched something when we tried that the first time.