Setting Multiple Domain pada Apache Tomcat

Tutorial

Banyak domain (Multiple domain) dapat diletakkan pada satu mesin/server dengan satu web server, misalnya Tomcat, Apache atau IIS. Cara seperti ini dapat digunakan untuk menghemat IP publik. Beberapa domain dan subdomain misalnya www.domainku.com, blog.domainku.com dan download.domainku.com dapat di-host pada satu web server dengan satu IP publik.

Pada tomcat, yang perlu dilakukan adalah menambahkan beberapa konfigurasi:

Pertama,
Buka file server.xml pada ${CATALINA_HOME}/conf
${CATALINA_HOME} adalah direktori tempat tomcat diinstall. Misalnya /usr/local/tomcat pada linux atau c:\tomcat ada Windows tergantung dimana Tomcat diinstall, kemudian tambahkan kode berikut:

<Server>
     <Service>
         <Engine>
           ..................
           ..................
           <Host name="blog.domainku.com"
                       debug="0"
                       appBase="/home/user/blog"
                       unpackWARs="true"
                       autoDeploy="true"
                       xmlValidation="true"
                       xmlNamespaceAware="false">
                    <Alias>blog.domainku.com</Alias>
           </Host>
         </Engine>
     </Service>
 </Server>

Kedua,
Masuk ke direktori ${CATALINA_HOME}/conf/Catalina dan buat direktori baru blog.domainku.com

Ketiga,
Masuk ke direktori ${CATALINA_HOME}/conf/Catalina/blog.domainku.com dan buat file baru dengan nama ROOT.xml yang isinya adalah sebagai berikut:

<Context docBase="/home/user/blog" path="" />

Terakhir,
Restart tomcat.

1,719 thoughts on “Setting Multiple Domain pada Apache Tomcat

  1. You’ve made ome good points there. I checked on thhe nnet ffor mokre inhfo about thee issxue andd founbd mpst
    ndividuals wilol ggo along wkth our vioews oon this site.

  2. I have been browsing on-line more than three hours nowadays, yet I by no means
    discovered any fascinating article like yours.
    It’s lovely price enough for me. In my view, if all web owners and bloggers made excellent content material as you probably did, the internet might
    be much more useful than ever before.

  3. It’s perfect time to make a few plans for the
    long run and it is time to be happy. I’ve learn this put up and
    if I could I wish to suggest you few fascinating issues
    or suggestions. Maybe you can write next articles referring to this article.
    I want to read more issues about it!

  4. Ahaa, its pleasant discussion concerning this article here
    at this blog, I have read all that, so at this time
    me also commenting here.

  5. scoliosis
    In fact no matter if someone doesn’t know then its up to other visitors that they
    will help, so here it occurs. scoliosis

  6. scoliosis
    Hmm is anyone else having problems with the images on this blog loading?
    I’m trying to determine if its a problem on my end or if it’s the blog.

    Any responses would be greatly appreciated. scoliosis

  7. Hi there, i read your blog from time to time and i own a similar one and i was just wondering if you
    get a lot of spam feedback? If so how do you stop it, any plugin or anything you can suggest?
    I get so much lately it’s driving me insane so any assistance is very much appreciated.

  8. Quality content is the crucial to attract the users to go to see the web page, that’s what this site is providing.

  9. I am extremely impressed with your writing skills and also with
    the layout on your weblog. Is this a paid theme or did
    you modify it yourself? Anyway keep up the nice quality writing, it’s rare to see a nice blog like this one these days.

  10. Hey! Someone in my Myspace group shared this site with us so I came to
    look it over. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to
    my followers! Superb blog and terrific design and style.

Comments are closed.