hello. I've got a web project which have differents environment : dev, test and prod. i've got 3 web site : http://localhost:8888, http://localhost:8989, and http://localhost:9090 for theses environments. i would like to make 3 virtual hosts using apache+modlisp+hunchentoot i modify httpd.conf life this :
<VirtualHost *:80> ServerName dev.myfoo.org LispServer 127.0.0.1 8888 "DevFoo" SetHandler lisp-handler </VirtualHost>
<VirtualHost *:80> ServerName test.myfoo.org LispServer 127.0.0.1 8989 "TestFoo" SetHandler lisp-handler </VirtualHost>
<VirtualHost *:80> ServerName myfoo.org LispServer 127.0.0.1 9090 "ProdFoo" SetHandler lisp-handler </VirtualHost>
<VirtualHost _default_:80> DocumentRoot /var/www/ </VirtualHost>
i start the PROD web site with :
hunchentoot:start-server :port 9090 :mod-lisp-p t
i try http://www.myfoo.org, but i've got not response. anyone understand where is my mistake on this configuration ?
thanks for any help
Nicolas Lamirault wrote:
hello. I've got a web project which have differents environment : dev, test and prod. i've got 3 web site : http://localhost:8888, http://localhost:8989, and http://localhost:9090 for theses environments. i would like to make 3 virtual hosts using apache+modlisp+hunchentoot i modify httpd.conf life this :
<VirtualHost *:80> ServerName dev.myfoo.org LispServer 127.0.0.1 8888 "DevFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost *:80> ServerName test.myfoo.org LispServer 127.0.0.1 8989 "TestFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost *:80> ServerName myfoo.org LispServer 127.0.0.1 9090 "ProdFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost _default_:80> DocumentRoot /var/www/ </VirtualHost>
i start the PROD web site with :
hunchentoot:start-server :port 9090 :mod-lisp-p t
i try http://www.myfoo.org, but i've got not response. anyone understand where is my mistake on this configuration ?
thanks for any help
I don't think you can have three virtual hosts listening to the same port 80. Apache is just listening on port 80 - it doesn't know about the domain name differences that got stuff mapped their. Try changing the Apache ports to be distinct and it should work.
Also, I am assuming you either have DNS servers pointing myfoo.org to the hosting machine? Or /etc/hosts or something?
--Jeff
On Tue, 08 Jan 2008 07:09:49 -0800, Jeff Cunningham jeffrey@cunningham.net wrote:
I don't think you can have three virtual hosts listening to the same port 80.
Sure you can. That's the whole point of virtual hosts.
Edi Weitz wrote:
On Tue, 08 Jan 2008 07:09:49 -0800, Jeff Cunningham jeffrey@cunningham.net wrote:
I don't think you can have three virtual hosts listening to the same port 80.
Sure you can. That's the whole point of virtual hosts.
http://httpd.apache.org/docs/1.3/vhosts/name-based.html _______________________________________________
Thanks for pointing that out.
On Tue, 08 Jan 2008 12:05:49 +0100, Nicolas Lamirault nlamirault@gmail.com wrote:
<VirtualHost *:80> ServerName dev.myfoo.org LispServer 127.0.0.1 8888 "DevFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost *:80> ServerName test.myfoo.org LispServer 127.0.0.1 8989 "TestFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost *:80> ServerName myfoo.org LispServer 127.0.0.1 9090 "ProdFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost _default_:80> DocumentRoot /var/www/ </VirtualHost>
i start the PROD web site with :
hunchentoot:start-server :port 9090 :mod-lisp-p t
i try http://www.myfoo.org, but i've got not response. anyone understand where is my mistake on this configuration ?
www.myfoo.org is not one of the server names mentioned in your configuration, you only have myfoo.org.
Edi Weitz edi@agharta.de writes:
On Tue, 08 Jan 2008 12:05:49 +0100, Nicolas Lamirault nlamirault@gmail.com wrote:
<VirtualHost *:80> ServerName dev.myfoo.org LispServer 127.0.0.1 8888 "DevFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost *:80> ServerName test.myfoo.org LispServer 127.0.0.1 8989 "TestFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost *:80> ServerName myfoo.org LispServer 127.0.0.1 9090 "ProdFoo" SetHandler lisp-handler
</VirtualHost>
<VirtualHost _default_:80> DocumentRoot /var/www/ </VirtualHost>
i start the PROD web site with :
hunchentoot:start-server :port 9090 :mod-lisp-p t
i try http://www.myfoo.org, but i've got not response. anyone understand where is my mistake on this configuration ?
www.myfoo.org is not one of the server names mentioned in your configuration, you only have myfoo.org.
exact i modify the Apache configuration file :
<VirtualHost *:80> ServerName www.myfoo.org LispServer 127.0.0.1 9090 "ProdFoo" SetHandler lisp-handler </VirtualHost>
but if i try www.myfoo.org i've got an error 500
in the apache access log file i've got only :
194.51.71.190 - - [08/Jan/2008:17:17:02 +0100] "GET / HTTP/1.1" 500 608 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11"
nothing in the error file ...
On Tue, 08 Jan 2008 17:21:13 +0100, Nicolas Lamirault nlamirault@gmail.com wrote:
i modify the Apache configuration file :
<VirtualHost *:80> ServerName www.myfoo.org LispServer 127.0.0.1 9090 "ProdFoo" SetHandler lisp-handler
</VirtualHost>
but if i try www.myfoo.org i've got an error 500
A 500 error is usually a sign that mod_lisp couldn't connect to the Lisp process. Did you try a full restart of Apache (shut down, then start up again)? Sometimes mod_lisp leaves "old" sockets open if you only do a "graceful" restart.
Is your Lisp process really listening on 9090? Have you confirmed that your web application works correctly if you connect to it directly, i.e. if you start it without :MOD-LISP-P T?
I think the docs somewhere say that working with mod_lisp is more inconvenient than working without it. One of the reasons is that you might have to restart Apache pretty often. Another one is that debugging is harder. I would recommend to develop your app "stand-alone" and only if it works switch it to mod_lisp.
Edi.