You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Tomaz Lavieri <to...@gmail.com> on 2009/11/15 14:50:15 UTC

Multiple domains (one for each weblog)

Hi all,

    first my configuration are: Apache Roller 4.0.1, Apache Tomcat 6.0.20,
Apache Httpd 2.2.9, i have a dedicated server machine where i can configure
mutiple domains.

    I try search it every where, but i didnt found =[

    I m want to put each of my weblogs at your owner domain, but i get no
clue how to do that

    I have my main domain, with many weblogs http://mymaindomain.com/

    all of my weblogs are like contexts of this domains
    http://mymaindomain.com/firstblog
    http://mymaindomain.com/secondblog
    http://mymaindomain.com/otherblog
    http://mymaindomain.com/moreoneblog

    and i wanna to change that to:

    http://firstblog.com/
    http://secondblog.com/
    http://otherblog.com/
    http://moreoneblog.com/

    all of this domains are on the same server, on the same Tomcat, with
virtual hosts, i can point all to roller context, but in this case all open
my main blog, i need to use a main blog for each case based at domain name.
Any one try it ? can any one help me ?

Ps.: Sorry for my english.

-- 
Tomaz Lavieri
Sun Certified Java Programmer (SCJP 6)

meu blog => http://blog.tomazlavieri.com.br/
twitter => http://twitter.com/tomazlavieri

Re: Multiple domains (one for each weblog)

Posted by Horatia <ro...@gmx.info>.
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









Re: Multiple domains (one for each weblog)

Posted by Alfonso Romero <ib...@prodigy.net.mx>.
Take a look at this article: 
http://blog.ibacsoft.com/opensource/entry/subdomains_with_apache_and_tomcat

Hope it can help you out :)

Regards,

Alfonso

----- Original Message ----- 
From: "Tomaz Lavieri" <to...@gmail.com>
To: <us...@roller.apache.org>
Sent: Sunday, November 15, 2009 7:50 AM
Subject: Multiple domains (one for each weblog)


> Hi all,
>
>    first my configuration are: Apache Roller 4.0.1, Apache Tomcat 6.0.20,
> Apache Httpd 2.2.9, i have a dedicated server machine where i can 
> configure
> mutiple domains.
>
>    I try search it every where, but i didnt found =[
>
>    I m want to put each of my weblogs at your owner domain, but i get no
> clue how to do that
>
>    I have my main domain, with many weblogs http://mymaindomain.com/
>
>    all of my weblogs are like contexts of this domains
>    http://mymaindomain.com/firstblog
>    http://mymaindomain.com/secondblog
>    http://mymaindomain.com/otherblog
>    http://mymaindomain.com/moreoneblog
>
>    and i wanna to change that to:
>
>    http://firstblog.com/
>    http://secondblog.com/
>    http://otherblog.com/
>    http://moreoneblog.com/
>
>    all of this domains are on the same server, on the same Tomcat, with
> virtual hosts, i can point all to roller context, but in this case all 
> open
> my main blog, i need to use a main blog for each case based at domain 
> name.
> Any one try it ? can any one help me ?
>
> Ps.: Sorry for my english.
>
> -- 
> Tomaz Lavieri
> Sun Certified Java Programmer (SCJP 6)
>
> meu blog => http://blog.tomazlavieri.com.br/
> twitter => http://twitter.com/tomazlavieri
>
>
>
> __________ NOD32 4610 (20091115) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>