[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Virtual Hosts on Qube3 - the httpd.conf way



> now i have restored qube3 os and want to try the Httpd.conf 
> way... does
> anyone have an example file... but one that is actually 
> running virtual
> sites on a qube for me to try out... y have tried with the examples on
> apache site but when i do that the web server stop working...
> 
> 


Hi,

the httpd.conf thing did not work for me either. I made a simple
solution a while back, which is NOT prettry, but comes close to the
virtual site support you want. I'll look into the "clean" method for the
Q3 later, and post here.

first problem is to make the qube respond to multiple domain names, this
can be done by edititing 
/etc/httpd/confhttpd.conf and changing UseCanonicalName to OFF
Now, your cube will serve the website in /home/groups/home/web  to both
www.depopo.net, www.clawsandteeth.com, and whatever more you may want to
point to it.

Now, just make users for your different domains, and add an index
document in your main website to redirect to the users sites, like:

<% 
wens=request.ServerVariables("HTTP_HOST")
wens=ucase(trim(wens))
if wens="WWW.CLAWSANDTEETH.COM" then
	response.redirect("~cat")
end if

.
.
.
.
.

if wens="SANNEWEB.DEPOPO.NET" then
	response.redirect("http://www.depopo.net/~sanneweb";)
end if

if wens="WWW.DEPOPO.NET" then
	response.redirect("~depopo")
end if

response.redirect("~anythingelse")
%>


As said, it is not perfect, for instance you can not use seperate stats
this way with webalizer (http://www.depopo.net/stats)


Bob.