[hunchentoot-devel] Multiple websites serving off the same hunchentoot server

Hey everyone, I recently started porting several websites I run to sbcl and wish to run them off hunchentoot but would like to run them of the same instance. Is there a way to have hunchentoot serve different directories to different websites? So what I am really asking is can hunchentoot do the following when it recieves a request from www.x.com it would serve pages from my directory /home/me/x and when it recieves a request from www.y.com it would serve pages from my directory /home/me/y Appreciate any help that you could provide and thanks in advance. Regards, Mackram Raydan Website: www.trailoflight.net "An invasion of armies can be resisted, but not an idea whose time has come." Victor Hugo

On Sat, Jun 6, 2009 at 23:37, Mackram Raydan<mackram@gmail.com> wrote:
I recently started porting several websites I run to sbcl and wish to run them off hunchentoot but would like to run them of the same instance. Is there a way to have hunchentoot serve different directories to different websites?
There is the hunchentoot-vhost package (http://cyrusharmon.com/projects?project=hunchentoot-vhost) written by Cyrus Harmon, but I do not know whether it has been ported to Hunchentoot 1.0 yet. -Hans

On Sun, Jun 07, 2009 at 12:37:21AM +0300, Mackram Raydan wrote:
I recently started porting several websites I run to sbcl and wish to run them off hunchentoot but would like to run them of the same instance. Is there a way to have hunchentoot serve different directories to different websites? So what I am really asking is can hunchentoot do the following when it recieves a request from www.x.com it would serve pages from my directory /home/me/x and when it recieves a request from www.y.com it would serve pages from my directory /home/me/y
Appreciate any help that you could provide and thanks in advance.
You could configure Apache to do it for you. Set up a "reverse proxy" such that x.com goes to a Hunchentoot server listening on localhost:1234, and y.com goes to a Hunchentoot server listening on localhost:1235. Both Hunchentoot servers could be running from the same Lisp image, of course. <VirtualHost your.numeric.ip.address> ServerAdmin webmaster@x.com ServerName x.com ProxyRequests off ProxyPass / http://localhost:1234/ ProxyPassReverse / http://localhost:1234/ </VirtualHost> <VirtualHost your.numeric.ip.address> ServerAdmin webmaster@y.com ServerName y.com ProxyRequests off ProxyPass / http://localhost:1235/ ProxyPassReverse / http://localhost:1235/ </VirtualHost> I use Apache to proxy only one Hunchentoot server right now, but I see no reason the above wouldn't work. See Edi's "Hunchentoot behind a proxy" documentation, and Apache's "VirtualHost", "ProxyPass", and "ProxyPassReverse" documentation. -- Larry
participants (3)
-
Hans Hübner
-
Larry Clapp
-
Mackram Raydan