Live is much easier without a httpd-server like apache;it's an old fashioned
approach. Starting with tomcat 6
it makes often no sense to place apache in front of tomcat.Tomcat standalone
is: easier to setup and to configure,
much faster,more secure,.. (unfortunately in some cases you need a hhtpd or
proxy).
Assuming Tomcat is installed & configured! First step is to configure virtual
hosts in tomcat, that is easy!
In this example I use three different domains, but the nos. of domains are
unlimited.
Stop tomcat and use a server.xml file like this:
<Server
port="8005"
shutdown="SHUTDOWN">
<Service
name="Catalina">
<Connector
address="ip-address"
port="8080"
URIEncoding="UTF-8" />
<Engine
name="Catalina"
defaultHost="domain1">
<Host
name="domain1"
appBase="rollerwebapp-domain1"
unpackWARs="true"
autodeploy="false"
reloadable="false"
xmlValidation="false"
xmlNamespaceAware="false"
workDir="work/Catalina/domain1" >
<Context
path="/"
docBase="ROOT" />
</Host>
<Host
name="domain2"
appBase="rollerwebapp-domain2"
unpackWARs="true"
autodeploy="false"
reloadable="false"
xmlValidation="false"
xmlNamespaceAware="false"
workDir="work/Catalina/domain2" >
<Context
path="/"
docBase="ROOT" />
</Host>
<Host
name="domain3"
appBase="rollerwebapp-domain3"
unpackWARs="true"
autodeploy="false"
reloadable="false"
xmlValidation="false"
xmlNamespaceAware="false"
workDir="work/Catalina/domain3" >
<Context
path="/"
docBase="ROOT"/>
</Host>
</Engine>
</Service>
</Server>
Next step: mkdir -p $CATALINA_HOME/rollerwebapp-domain1 and 2 and 3
mv roller.war to ROOT.war and cp ROOT.war to
$CATALINA_HOME/rollerwebapp-domain1 and 2 and 3
Create a database & a roller-custom.properties file for each domain.
Take care that you are the owner: chown -R tomcat:tomcat /opt if
$CATALINA_HOME is placed there
and you run tomcat with owner/group tomcat, or chown -R root:root /opt
start tomcat
go to http//www.domain1.tld and create your first blog
set the landing page (name of your first blog) inside roller:
main menu > server administration > Handle of weblog to serve as frontpage blog
> your blogname
same with domain2 and domain3
>From now on you can reach your blogs with
>http://www.domain1.tld,http://www.domain2.tld,http://www.domain3.tld
Horatia